How do you get the AI to run?

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
m4rine
Major General
Posts: 714
Joined: Fri Apr 11, 2003 5:28 pm
Location: UK

How do you get the AI to run?

Post by m4rine »

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)
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

runto

Post by tltrude »

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".
Tom Trude,

Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

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
User avatar
Gen Cobra
Major General
Posts: 739
Joined: Tue Jan 28, 2003 4:26 pm

Post by Gen Cobra »

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.
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Why not simply use enemies with type_idle 'patrol' or 'runner'? All you gotta do is give them a patrolnode and your set for walking/running AIs :)
Image
User avatar
Gen Cobra
Major General
Posts: 739
Joined: Tue Jan 28, 2003 4:26 pm

Post by Gen Cobra »

jv_map wrote:Why not simply use enemies with type_idle 'patrol' or 'runner'? All you gotta do is give them a patrolnode and your set for walking/running AIs :)
Honestly I always got them to run at me and be agressive with the min max dis settings. Thats just me. But i know what you mean.
Image
Post Reply