path_corners and the z axis

Discuss programming in the QuakeC language.
Post Reply
dreadlorde
Posts: 268
Joined: Tue Nov 24, 2009 2:20 am
Contact:

path_corners and the z axis

Post by dreadlorde »

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:

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!
daemonicky
Posts: 185
Joined: Wed Apr 13, 2011 1:34 pm

Post by daemonicky »

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.
Think, touch, movetype, solid, traceline ...
necros
Posts: 77
Joined: Thu Dec 16, 2004 10:32 pm

Post by necros »

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? :P
gnounc
Posts: 428
Joined: Mon Apr 06, 2009 6:26 am

JUST CAUSE thats why!

Post by gnounc »

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.
necros
Posts: 77
Joined: Thu Dec 16, 2004 10:32 pm

Post by necros »

you mean for spam?

so like, post 'hey guys' and then change it later to 'buy my crappy stuff!'?
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Post by Nahuel »

necros wrote:you mean for spam?

so like, post 'hey guys' and then change it later to 'buy my crappy stuff!'?
so funny :)
hi, I am nahuel, I love quake and qc.
gnounc
Posts: 428
Joined: Mon Apr 06, 2009 6:26 am

Post by gnounc »

exactly.
Post Reply