Best way to follow the leader

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Best way to follow the leader

Post by Alcoholic »

hi. in the map im making, i want the ai to follow the captain. so far what ive been doing is set up the nodes for the leader, and in the script, i put the other friendlys' destination to "level.captain" (the leader). everything works, but when the leader stops at the end, the other guys come up to him and 'merge' into him, creating a 4 headed 8 arms/legs freak. i dont want to make them all just follow nodes, because something will happen and one of the privates will be in front leading the way. i was wondering the best way to get privates to follow a captain without leading the way themselves. one way i thought of is setting the privates' tether to the captain, and giving them a distance of about 512. that way, they would always be dragged along by the captain. the problem with that is i dont want them to stay by him during battle. is there anyway i can temporarily disable the leash during combat? plz put lots of comments in your scripts because im still learning. :(
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

The friendly.scr file is pretty much a mess and not capable of coping with this kind of situations.

I think the best way to go is just to script these guys all by yourself, like I'm doing for my sp map :).

Note that AIs ignore leashes when responding to a moveto command or a grenade.
Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

You can set their .distance to control how close they follow
key: distance value: ??
Post Reply