leaveVehicle: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(67 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma2 |= Game name
|game1= arma2
|version1= 1.00


|1.00|= Game version
|game2= arma2oa
|version2= 1.50


|arg= local |= Arguments in MP
|game3= tkoh
|version3= 1.00


|eff= local |= Effects in MP
|game4= arma3
____________________________________________________________________________________________
|version4= 0.50


| Ceases the using of the vehicle by either a unit or a group. It unassigns them from the vehicle.  |= Description
|arg= local
____________________________________________________________________________________________


| group '''leaveVehicle''' vehicle |= Syntax
|eff= local


|p1= group: [[Object]] or [[Group]] |= PARAMETER1
|gr1= Unit Control


|p2= vehicle: [[Object]] |= PARAMETER2
|gr2= Groups


|p3= |= PARAMETER3
|descr= 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.<br>
<br>
In short the command could be hypothetically presented as:<br>
<sqf>leaveVehicle = un-addVehicle + unassignVehicle forEach crew</sqf>


| [[Nothing]] |= RETURNVALUE
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.}}


|s1= group [[leaveVehicle]] vehicle


|x1= <code>soldierOne leaveVehicle jeepOne</code>|= EXAMPLE1
|p1= group: [[Group]] or [[Object]] - object's [[Group]] is used


|x2= <code>groupOne leaveVehicle jeepOne</code>|= EXAMPLE2
|p2= vehicle: [[Object]]


____________________________________________________________________________________________
|r1= [[Nothing]]


| [[addVehicle]], [[assignAsCargo]], [[assignAsCommander]], [[assignAsDriver]], [[assignAsGunner]], [[assignedVehicle]], [[unassignVehicle]] |= SEEALSO
|x1= <sqf>_unit leaveVehicle _vehicle;</sqf>


| |= MPBEHAVIOUR
|x2= <sqf>_grp leaveVehicle _vehicle;</sqf>
____________________________________________________________________________________________
 
|seealso= [[addVehicle]] [[assignAsCargo]] [[assignAsCommander]] [[assignAsDriver]] [[assignAsGunner]] [[assignedVehicle]] [[unassignVehicle]] [[doGetOut]] [[commandGetOut]] [[createVehicleCrew]] [[assignedVehicles]] [[assignedGroup]] [[fullCrew]]
}}
}}


<h3 style='display:none'>Notes</h3>
{{Note
<dl class='command_description'>
|user= Killzone_Kid
<!-- Note Section BEGIN -->
|timestamp= 20130831160800
<dd class="notedate">Posted on August 31, 2013
|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.
<dt class="note">'''[[User:Killzone_Kid|Killzone_Kid]]'''
}}
<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.
 
 
<!-- Note Section END -->
</dl>
 
<h3 style='display:none'>Bottom Section</h3>
[[Category:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Unit_Control|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Vehicle_Assignment|{{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.