leaveVehicle: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<dl class="command_description"> <dd class="notedate">" to "<dl class="command_description"> <dt></dt> <dd class="notedate">")
mNo edit summary
 
(32 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| arma2
|game1= arma2
|version1= 1.00


|1.00
|game2= arma2oa
|version2= 1.50
 
|game3= tkoh
|version3= 1.00
 
|game4= arma3
|version4= 0.50


|arg= local
|arg= local
Line 13: Line 21:
|gr2= Groups
|gr2= Groups


| Ceases the using of the vehicle by a group and unassigns vehicle from the group. If the argument is a single unit, the vehicle will be unassigned from unit's group. After vehicle is unassigned from the group, each individual crew member then unassigned from the vehicle.
|descr= Ceases the using of the vehicle by a group and unassigns vehicle from the group.
<br><br>In short the command could be hypothetically presented as:<br>
If the argument is a single unit, the vehicle will be unassigned from unit's group.
<tt>[[leaveVehicle]] <nowiki>=</nowiki> un-[[addVehicle]] + [[unassignVehicle]] [[forEach]] [[crew]]</tt> <br>
After vehicle is unassigned from the group, each individual crew member then unassigned from the vehicle.<br>
However, to make it more reliable, it is best to move unit out of the vehicle manually with [[moveOut]] command and force unassign the vehicle with [[unassignVehicle]]
<br>
In short the command could be hypothetically presented as:<br>
<sqf>leaveVehicle = un-addVehicle + unassignVehicle forEach crew</sqf>
 
However, to make it more reliable, it is best to move unit out of the vehicle manually with [[moveOut]] and force unassign the vehicle with [[unassignVehicle]].
{{Feature|informative|See [[AI Group Vehicle Management]] for more information.}}


| group '''leaveVehicle''' vehicle
|s1= group [[leaveVehicle]] vehicle


|p1= group: [[Group]] or [[Object]], in which case, object's [[Group]] is used
|p1= group: [[Group]] or [[Object]] - object's [[Group]] is used


|p2= vehicle: [[Object]]
|p2= vehicle: [[Object]]


| [[Nothing]]
|r1= [[Nothing]]


|x1= <code>_unit [[leaveVehicle]] _vehicle</code>
|x1= <sqf>_unit leaveVehicle _vehicle;</sqf>


|x2= <code>_grp [[leaveVehicle]] _vehicle</code>
|x2= <sqf>_grp leaveVehicle _vehicle;</sqf>


|seealso= [[addVehicle]], [[assignAsCargo]], [[assignAsCommander]], [[assignAsDriver]], [[assignAsGunner]], [[assignedVehicle]], [[unassignVehicle]], [[doGetOut]], [[commandGetOut]], [[createVehicleCrew]]
|seealso= [[addVehicle]] [[assignAsCargo]] [[assignAsCommander]] [[assignAsDriver]] [[assignAsGunner]] [[assignedVehicle]] [[unassignVehicle]] [[doGetOut]] [[commandGetOut]] [[createVehicleCrew]] [[assignedVehicles]] [[assignedGroup]] [[fullCrew]]
}}
}}


<dl class="command_description">
{{Note
<dt></dt>
|user= Killzone_Kid
<dd class="notedate">Posted on August 31, 2013</dd>
|timestamp= 20130831160800
<dt class="note">[[User:Killzone_Kid|Killzone_Kid]]</dt>
|text= In {{arma3}} this command will not force a player to exit from a vehicle. It will unassign vehicle role for this player. AI crew however will also disembark.
<dd class="note">In Arma 3 this command will not force a player to exit from a vehicle. It will unassign vehicle role for this player. AI crew however will also disembark.
}}
 
 
</dl>
 
 
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 06:26, 7 November 2023

Hover & click on the images for description

Description

Description:
Ceases the using of the vehicle by a group and unassigns vehicle from the group. If the argument is a single unit, the vehicle will be unassigned from unit's group. After vehicle is unassigned from the group, each individual crew member then unassigned from the vehicle.

In short the command could be hypothetically presented as:
However, to make it more reliable, it is best to move unit out of the vehicle manually with moveOut and force unassign the vehicle with unassignVehicle.
See AI Group Vehicle Management for more information.
Groups:
Unit ControlGroups

Syntax

Syntax:
group leaveVehicle vehicle
Parameters:
group: Group or Object - object's Group is used
vehicle: Object
Return Value:
Nothing

Examples

Example 1:
_unit leaveVehicle _vehicle;
Example 2:
_grp leaveVehicle _vehicle;

Additional Information

See also:
addVehicle assignAsCargo assignAsCommander assignAsDriver assignAsGunner assignedVehicle unassignVehicle doGetOut commandGetOut createVehicleCrew assignedVehicles assignedGroup fullCrew

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Killzone_Kid - c
Posted on Aug 31, 2013 - 16:08 (UTC)
In Arma 3 this command will not force a player to exit from a vehicle. It will unassign vehicle role for this player. AI crew however will also disembark.