How do you get the AI to run?
Moderator: Moderators
How do you get the AI to run?
It looks better if the AI runs towards you, right? Well, how do you do this? I know about getting the AI to charge with alarms and maxdist/mindist - but I mean them running on a patrol or something. Would you do something to the script or what? My guess is maybe key = 'speed' (or max_speed) value = '150' or something in the script. Is this right?
"We must become the change we want to see in the world" (Mahatma Gandhi)
runto
I don't really know, but I have seen a "runto.scr" script in global. I would think it would be set in a node, kinda like "run to the next node".
Try linking a line of info_pathnodes and give the first one a targetname such as node1 then try this but don't forget that if he encounters an enemy he will stop running his path unless you disable him first .
$myai exec global/moveto.scr anim/run.scr $node1
or
$myai exec global/moveto.scr anim/walk.scr $node1
or
$myai exec global/disable_ai.scr
$myai exec global/moveto.scr anim/run.scr $node1
$myai waittill movedone
$myai exec global/enable_ai.scr
$myai exec global/moveto.scr anim/run.scr $node1
or
$myai exec global/moveto.scr anim/walk.scr $node1
or
$myai exec global/disable_ai.scr
$myai exec global/moveto.scr anim/run.scr $node1
$myai waittill movedone
$myai exec global/enable_ai.scr
This is my fav way. With the ai selected press I. Then look down neear the middle where it says min dis and max dis. Changing these values will give you several results. These values have to do with how the ai will react when it sees the player in decideswhat dis it is from the enemy and what it should do about it be it run from them or run to them.
Create info>pathnodes. Place them around the map in places you want the ai to run to. When the ai does make it's mind up what it's gonna do run at you or run from you it wil use these nodes to run to that you designated.
I cant for the life of me remember how it works I forget sometimes. Changing the values makes the ai either run at you or run from you. You can make them run at you like a suicide man or run from u like well a pussy... cat. But Im sure someone here can pick up where I left off on that.
Create info>pathnodes. Place them around the map in places you want the ai to run to. When the ai does make it's mind up what it's gonna do run at you or run from you it wil use these nodes to run to that you designated.
I cant for the life of me remember how it works I forget sometimes. Changing the values makes the ai either run at you or run from you. You can make them run at you like a suicide man or run from u like well a pussy... cat. But Im sure someone here can pick up where I left off on that.


