How do you get allied ai to move around your map

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
soUl_keePer
Private
Posts: 4
Joined: Sun Oct 05, 2003 6:51 pm
Location: winnipeg mb

How do you get allied ai to move around your map

Post by soUl_keePer »

How do you get allied ai to move around your map just like in mission 3l3?????? :? :? :? :? :? :?: :!: :?: :!: :?: :!:
Ur soUl iS miNe
crunch
Major
Posts: 348
Joined: Sat Jun 14, 2003 2:34 pm
Location: USA
Contact:

Post by crunch »

Moving to the scripting forum. :wink:
Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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 .
soUl_keePer
Private
Posts: 4
Joined: Sun Oct 05, 2003 6:51 pm
Location: winnipeg mb

Post by soUl_keePer »

ok ill try that :D
Ur soUl iS miNe
BiG_HeaD
Brigadier General
Posts: 531
Joined: Thu Jul 03, 2003 7:28 pm

Post by BiG_HeaD »

hey did u figure it out?
soUl_keePer
Private
Posts: 4
Joined: Sun Oct 05, 2003 6:51 pm
Location: winnipeg mb

Post by soUl_keePer »

Not Yet


scripting is hard...i'm more of a mapper that anything
Ur soUl iS miNe
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post 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. 8-)
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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 .
Post Reply