leaveVehicle: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) |
BrettMayson (talk | contribs) mNo edit summary |
||
(11 intermediate revisions by 2 users not shown) | |||
Line 21: | Line 21: | ||
|gr2= Groups | |gr2= Groups | ||
|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. | |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. | ||
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]] | <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.}} | {{Feature|informative|See [[AI Group Vehicle Management]] for more information.}} | ||
|s1= group [[leaveVehicle]] vehicle | |s1= group [[leaveVehicle]] vehicle | ||
|p1= group: [[Group]] or [[Object]] | |p1= group: [[Group]] or [[Object]] - object's [[Group]] is used | ||
|p2= vehicle: [[Object]] | |p2= vehicle: [[Object]] | ||
Line 35: | Line 39: | ||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
|x1= < | |x1= <sqf>_unit leaveVehicle _vehicle;</sqf> | ||
|x2= < | |x2= <sqf>_grp leaveVehicle _vehicle;</sqf> | ||
|seealso= [[addVehicle]] [[assignAsCargo]] [[assignAsCommander]] [[assignAsDriver]] [[assignAsGunner]] [[assignedVehicle]] [[unassignVehicle]] [[doGetOut]] | |seealso= [[addVehicle]] [[assignAsCargo]] [[assignAsCommander]] [[assignAsDriver]] [[assignAsGunner]] [[assignedVehicle]] [[unassignVehicle]] [[doGetOut]] [[commandGetOut]] [[createVehicleCrew]] [[assignedVehicles]] [[assignedGroup]] [[fullCrew]] | ||
}} | }} | ||
{{Note | |||
|user= Killzone_Kid | |||
|timestamp= 20130831160800 | |||
|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. | |||
}} | |||
Latest revision as of 06:26, 7 November 2023
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. - 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
- 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.
Categories:
- Scripting Commands
- Introduced with Arma 2 version 1.00
- Arma 2: New Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Unit Control
- Command Group: Groups
- Scripting Commands: Local Effect