Jump to content
Sign in to follow this  
Kydoimos

Selecting a Pilot, Gunner, etc. in a Vehicle

Recommended Posts

Hi everyone - I'd like to know how I can edit a unit in a vehicle. For instance, how would I set the identity of the pilot if I set down a vehicle with the crew already inside, rather than an empty vehicle? Thanks in advance, guys!

Share this post


Link to post
Share on other sites

driver # , driver of vehicle #

gunner # , gunner of vehicle #

commnader # , commander of vehicle #

assigned# , # being one of commander, driver, gunner, cargo, not necessarily the unit currently in the position but has been assigned the role

assignedVehicleRole , will return the placement of a unit , being one of ["Cargo"], ["Driver"], ["Turret",[turret path]]

crew , while return an array of crew members in the order of [driver,gunner,commander,turrets,cargo]

E.g for your example

_pilot = driver _myHeli;

OR

_pilot = assignedDriver _myHeli;

OR

{
if ((assignedVehicleRole _x) select 0 == "Driver" ) then {
	_pilot = _x;
}; 
}forEach (crew myHeli);

OR

_pilot = (crew _myHeli) select 0;

Should be enough there for you to test and get what you need.

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  

×