unassignVehicle: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 25: Line 25:
'''Examples:'''
'''Examples:'''


'''unassignVehicle''' [[player]]
'''unassignVehicle''' [[player]]<br>
 
will make the player disembark
will make the player disembark


{'''unassignVehicle''' _x} [[forEach]] [[crew]] ''vehiclename''
{'''unassignVehicle''' _x} [[forEach]] [[crew]] ''vehiclename''<br>
 
will make all the occupants of a vehicle disembark
will make all the occupants of a vehicle disembark


Line 42: Line 40:
will make all the occupants of a vehicle disembark, if they are the original crew of the vehicle then they will just get back in again.  To prevent this happening also use [[allowGetIn]] as in the example below:
will make all the occupants of a vehicle disembark, if they are the original crew of the vehicle then they will just get back in again.  To prevent this happening also use [[allowGetIn]] as in the example below:


{'''unassignVehicle''' _x} [[forEach]] [[crew]] ''vehiclename''
{'''unassignVehicle''' _x} [[forEach]] [[crew]] ''vehiclename''<br>
 
[[crew]] ''vehiclename'' [[allowGetIn]] [[false]]
[[crew]] ''vehiclename'' [[allowGetIn]] [[false]]

Revision as of 09:59, 20 May 2006


unassignVehicle unit


Operand types:

unit: Object

Type of returned value:

Nothing

Description:

Unit is unassigned from the vehicle.

If he is currently in, group leader will issue order to disembark.


Examples:

unassignVehicle player
will make the player disembark

{unassignVehicle _x} forEach crew vehiclename
will make all the occupants of a vehicle disembark


Comments:

Even though:

{unassignVehicle _x} forEach crew vehiclename

will make all the occupants of a vehicle disembark, if they are the original crew of the vehicle then they will just get back in again. To prevent this happening also use allowGetIn as in the example below:

{unassignVehicle _x} forEach crew vehiclename
crew vehiclename allowGetIn false