vehicle: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
(Undo revision 110084 by killzone_kid (talk))
Line 43: Line 43:
[[Category:Scripting Commands ArmA2|VEHICLE]]
[[Category:Scripting Commands ArmA2|VEHICLE]]
[[Category:Scripting Commands Arma 3|VEHICLE]]
[[Category:Scripting Commands Arma 3|VEHICLE]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on November 1, 2018 - 12:11 (UTC)</dd>
<dt class="note">[[User:killzone_kid|killzone_kid]]</dt>
<dd class="note"> <code>[[driver]] [[vehicle]] [[player]];
[[commander]] [[vehicle]] [[player]];
[[gunner]] [[vehicle]] [[player]];
[[crew]] [[vehicle]] [[player]];</code> All these will return player for when player is not in a vehicle. [[objectParent]] on the other hand returns actual vehicle player is in.
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 21:44, 8 November 2018

Hover & click on the images for description

Description

Description:
Vehicle in which given unit is mounted. If none, unit is returned. Alternatively, use objectParent
Groups:
Uncategorised

Syntax

Syntax:
vehicle unitName
Parameters:
unitName: Object
Return Value:
Object

Examples

Example 1:
SQS ? vehicle player != player : hint "Player is in a vehicle"
Example 2:
SQFif (vehicle player != player) then {hint "Player is in a vehicle"};

Additional Information

See also:
objectParent

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

Notes

Bottom Section