path_corners and the z axis
Moderator: InsideQC Admins
7 posts
• Page 1 of 1
path_corners and the z axis
I'm trying to get monsters to follow path_corners that aren't aligned (or close to being aligned) on the z axis. I asked about this on func_msgboard and necros tried to help me out, but it was to no avail. My monsters still walk around aimlessly, ignoring path_corners that are too high/low for a previous one. My walktogoal function is just like necros described:
This replaces calls to movetogoal in ai_walk. Does anyone know how to get this to work? I can upload my codebase and two test maps if anyone needs more info.
- Code: Select all
void(float step) walktogoal =
{
self.enemy = self.goalentity;
movetogoal(step);
self.enemy = world;
}
This replaces calls to movetogoal in ai_walk. Does anyone know how to get this to work? I can upload my codebase and two test maps if anyone needs more info.
Ken Thompson wrote:One of my most productive days was throwing away 1000 lines of code.
Get off my lawn!
-

dreadlorde - Posts: 268
- Joined: Tue Nov 24, 2009 2:20 am
Does movetogoal fail because of that height? I suspect it might work only on straight lines. Try walkmove.
I found some tutorial on how to move to goal in Quake C. Move to goal should be implemented this way, maybe it will help.
I found some tutorial on how to move to goal in Quake C. Move to goal should be implemented this way, maybe it will help.
Think, touch, movetype, solid, traceline ...
-

daemonicky - Posts: 185
- Joined: Wed Apr 13, 2011 1:34 pm
hey again.
i think it might be that there are some other requirements for z adjustment to work.
specifically, i believe the entity in the enemy field must have a movetype other than movetype_none, which is what path_corners have.
try setting movetype of path_corner to movetype_noclip. this shouldn't impact path_corner entities in any way but, if i'm right, should make z adjustment work.
also, do not use walkmove() because walkmove never takes height into account, only movetogoal does.
edit: why does the board have spam protection on post edits?
i think it might be that there are some other requirements for z adjustment to work.
specifically, i believe the entity in the enemy field must have a movetype other than movetype_none, which is what path_corners have.
try setting movetype of path_corner to movetype_noclip. this shouldn't impact path_corner entities in any way but, if i'm right, should make z adjustment work.
also, do not use walkmove() because walkmove never takes height into account, only movetogoal does.
edit: why does the board have spam protection on post edits?
- necros
- Posts: 77
- Joined: Thu Dec 16, 2004 10:32 pm
JUST CAUSE thats why!
because a common tactic is to make an innocuous post or 5, so you dont get immediately banned, then edit each of them some days later.
-

gnounc - Posts: 424
- Joined: Mon Apr 06, 2009 6:26 am
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
