vehicle: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<h3 style="display:none">Bottom Section</h3> " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| ofp |Game name=
| ofp


|1.00|Game version=
|1.00


|arg= global |Multiplayer Arguments=
|arg= global


|gr1= Object Manipulation |GROUP1=
|gr1= Object Manipulation


| Vehicle in which given unit is mounted. If none, unit is returned. Alternatively, use [[objectParent]] |DESCRIPTION=
| Vehicle in which given unit is mounted. If none, unit is returned. Alternatively, use [[objectParent]]


| '''vehicle''' unitName |SYNTAX=
| '''vehicle''' unitName


|p1= unitName: [[Object]] |PARAMETER1=
|p1= unitName: [[Object]]


| [[Object]] |RETURNVALUE=
| [[Object]]
   
   
|x1= SQS <code>? '''vehicle''' [[player]] <nowiki>!=</nowiki> [[player]] : [[hint]] "Player is in a vehicle"</code> |EXAMPLE1=
|x1= SQS <code>? '''vehicle''' [[player]] <nowiki>!=</nowiki> [[player]] : [[hint]] "Player is in a vehicle"</code>
|x2= SQF<code>if ([[vehicle]] [[player]] != [[player]]) [[then]] {[[hint]] "Player is in a vehicle"};</code> |EXAMPLE2=
|x2= SQF<code>if ([[vehicle]] [[player]] != [[player]]) [[then]] {[[hint]] "Player is in a vehicle"};</code>


| [[objectParent]] |SEEALSO=
| [[objectParent]]


}}
}}

Revision as of 12:41, 18 January 2021

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:
Object Manipulation

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