vehicle: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Arma[ _]2(\|.*)?\]\]" to "{{GameCategory|arma2|Scripting Commands}}") |
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
||
Line 1: | Line 1: | ||
{{Command|Comments= | {{Command|Comments= | ||
| ofp |Game name= | | ofp |Game name= | ||
Line 9: | Line 8: | ||
|gr1= Object Manipulation |GROUP1= | |gr1= Object Manipulation |GROUP1= | ||
| 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]] |DESCRIPTION= | ||
| '''vehicle''' unitName |SYNTAX= | | '''vehicle''' unitName |SYNTAX= | ||
Line 19: | Line 16: | ||
| [[Object]] |RETURNVALUE= | | [[Object]] |RETURNVALUE= | ||
|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> |EXAMPLE1= | ||
|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> |EXAMPLE2= | ||
| [[objectParent]] |SEEALSO= | | [[objectParent]] |SEEALSO= |
Revision as of 04:19, 17 January 2021
Description
- Description:
- Vehicle in which given unit is mounted. If none, unit is returned. Alternatively, use objectParent
- Groups:
- Object Manipulation
Syntax
Examples
- Example 1:
- SQS
? vehicle player != player : hint "Player is in a vehicle"
- Example 2:
- SQF
if (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
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.00
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Command Group: Object Manipulation
- Scripting Commands OFP 1.99
- Scripting Commands OFP 1.96
- Scripting Commands OFP 1.46
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 3: Scripting Commands