Jump to content

Sign in to follow this  
OddballWDI

Need help with "leader" command

Recommended Posts

I'm writing a script for a mission where I need to assign a group to a truck. I want the leader to be assigned as the driver. The problem is sometimes the leader dies in combat before the group is told to get in the truck so then I have a bunch of AI guys sitting in a truck and they don't have a driver. I think the "leader" command is what I need from the BIKI, but I don't understand it's usage because the example isn't very good.

What is the best way to find out the leader of a group so I can issue him commands through a script?

THANKS!

Share this post


Link to post
Share on other sites

define a name for the group (grouName = group this in the init field of any group member), then simply use leader groupName whenever you want to access the actual leader (i.e: leader groupName assignAsDriver truck1)

Easy as that. smile_o.gif

Regards,

Wolfrug

Share this post


Link to post
Share on other sites

Don't you actually have to go:

leader ((units GroupName) select 0)

?

Could be wrong. Could be right. Could be right in a different version of the games. Dunno.

Share this post


Link to post
Share on other sites
  [b said:
Quote[/b] ]Don't you actually have to go:

leader ((units GroupName) select 0)

?

It works with both groups and units.

@OddballWDI

The wiki example in this case is a little confusing. Perhaps now someone has help solved your problem, you could add another example to the wiki wink_o.gif I could do it myself, but I'm sure your example would be more relevant to anyone else who is not familiar with the command?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×