Page 1 of 1
How do you get allied ai to move around your map
Posted: Sun Oct 05, 2003 6:59 pm
by soUl_keePer
Posted: Sun Oct 05, 2003 7:43 pm
by crunch
Moving to the scripting forum.

Posted: Sun Oct 05, 2003 8:44 pm
by bdbodger
I think what you need to do is to read the global/friendly.scr in pak0.pk3 to learn how to setup friendlies . It says at the top of the script how to set up the friendlies to follow the player .
Posted: Sun Oct 05, 2003 8:54 pm
by soUl_keePer
ok ill try that

Posted: Mon Oct 06, 2003 4:48 pm
by BiG_HeaD
hey did u figure it out?
Posted: Tue Oct 07, 2003 2:38 am
by soUl_keePer
Not Yet
scripting is hard...i'm more of a mapper that anything
Posted: Tue Oct 07, 2003 3:49 am
by Alcoholic
Well if you want someone to run from point a to point b its:
$guythatwillrun runto $placetorunto
You can throw that all over your script whenever you want people to move around.

Posted: Tue Oct 07, 2003 5:56 am
by bdbodger
To use the global/friendly.scr just make your ai firendlies in radiant targetname friendly . give each on a Key: #fnum Value: 1 up to 10 .
If all you want them to do is follow the player just do this .
main:
exec global/friendly.scr
level.friendly1 exec global/friendly.scr::friendlythink
level.friendly1.friendtype = 1
level.friendly1.distance = 128
level.friendly1.waittime = 2
end
You can alter how close the friendly follows with .distance and how long he waits at each node with .waittime. Make sure you have lots of info_pathnodes for navigation too they must be less than 360 or is it 320 units apart .
Another way to get allied ai to move is to make them runners . What you do is make an info_pathnode give it a targetname , hit the space bar to clone it keep doing that so that the pathnodes are in a line . Select the first node then the second node press the control key and k to target the second node from the first node , now select the third node and press control + k again to target the third node from the second . keep doing that until you have a chain of pathnodes . Then make an ai and press i to bring up the ai dialog box . choose type_idle runner . Put the name of the first pathnode in the box labeled patrolpath . Now the ai will run the path . But he will runaway . This is good when used with enemy spawners spawned by the global/ai.scr . You an also make an ai but set his type_idle to idle and when you want him to start running do this
$myai.patrolpath = $myaipath
$myai.type_idle ="runner"
but again he just runs doesn't follow the player .