Difference between revisions of "vehicle"

From Bohemia Interactive Community
Jump to navigation Jump to search
(sqf example; note about current arma 3 output)
(This is incorrect, vehicle player == player is always false if player is in driver seat)
Line 28: Line 28:
 
<dl class="command_description">
 
<dl class="command_description">
 
<!-- Note Section BEGIN -->
 
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on February 16, 2014
 
<dt class="note">'''[[User:Strangepete|Strangepete]]'''
 
<dd class="note">As of Arma 3, ( vehicle unit == unit ) is TRUE for units in the vehicle's Driver seat, IF vehicle not named manually in Editor.
 
Example 2 will return TRUE if vehicle pre-named in Editor; Example 2 will return FALSE if vehicle not pre-named, and player in Driver seat
 
 
<!-- Note Section END -->
 
<!-- Note Section END -->
 
</dl>
 
</dl>

Revision as of 17:45, 16 February 2014

Introduced with Operation Flashpoint version 1.001.00
Hover & click on the images for descriptions

Description

Description:
Vehicle in which given unit is mounted. If none, unit is returned.

Syntax

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

Examples

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

Additional Information

See also:
See also needed

Notes

i
Only post proven facts here. Report bugs on the feedback tracker and discuss on the Arma Discord or on the Forums.

Notes

Bottom Section