Forum

path_corners and the z axis

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

path_corners and the z axis

Postby dreadlorde » Sat Jul 30, 2011 10:53 pm

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!
User avatar
dreadlorde
 
Posts: 268
Joined: Tue Nov 24, 2009 2:20 am

Postby daemonicky » Sun Jul 31, 2011 11:43 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.
Think, touch, movetype, solid, traceline ...
User avatar
daemonicky
 
Posts: 185
Joined: Wed Apr 13, 2011 1:34 pm

Postby necros » Fri Aug 05, 2011 9:32 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? :P
necros
 
Posts: 77
Joined: Thu Dec 16, 2004 10:32 pm

JUST CAUSE thats why!

Postby gnounc » Sat Aug 06, 2011 4:39 am

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.
User avatar
gnounc
 
Posts: 424
Joined: Mon Apr 06, 2009 6:26 am

Postby necros » Sun Aug 07, 2011 12:47 am

you mean for spam?

so like, post 'hey guys' and then change it later to 'buy my crappy stuff!'?
necros
 
Posts: 77
Joined: Thu Dec 16, 2004 10:32 pm

Postby Nahuel » Sun Aug 07, 2011 1:00 am

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.
User avatar
Nahuel
 
Posts: 492
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Postby gnounc » Sun Aug 07, 2011 3:58 am

exactly.
User avatar
gnounc
 
Posts: 424
Joined: Mon Apr 06, 2009 6:26 am


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest