canMove: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Take[ _]On[ _]Helicopters(\|.*)?]]" to "{{GameCategory|tkoh|Scripting Commands}}")
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=
____________________________________________________________________________________________


| Returns if the given vehicle is still able to move.
| Returns if the given vehicle is still able to move.
Line 16: Line 14:
* A helicopter with a damaged tail rotor may return that it cannot move, where a skilled pilot could use it.
* A helicopter with a damaged tail rotor may return that it cannot move, where a skilled pilot could use it.
}} |DESCRIPTION=
}} |DESCRIPTION=
____________________________________________________________________________________________


| [[canMove]] unitName |SYNTAX=
| [[canMove]] unitName |SYNTAX=
Line 23: Line 20:


| [[Boolean]] - [[true]] if the vehicle is able to move, [[false]] if not |RETURNVALUE=
| [[Boolean]] - [[true]] if the vehicle is able to move, [[false]] if not |RETURNVALUE=
____________________________________________________________________________________________


|x1= <code>[[if]] ([[not]] [[canMove]] _tank) [[then]]
|x1= <code>[[if]] ([[not]] [[canMove]] _tank) [[then]]
Line 29: Line 25:
[[player]] [[sideChat]] "He's nailed on the ground! Now hurry!";
[[player]] [[sideChat]] "He's nailed on the ground! Now hurry!";
};</code> |EXAMPLE1=
};</code> |EXAMPLE1=
____________________________________________________________________________________________


| [[canFire]], [[canStand]] |SEEALSO=
| [[canFire]], [[canStand]] |SEEALSO=

Revision as of 01:28, 17 January 2021

Hover & click on the images for description

Description

Description:
Returns if the given vehicle is still able to move.
  • This command does not check for the amount of fuel the vehicle has, except for helicopters and airplanes.
  • A helicopter with a damaged tail rotor may return that it cannot move, where a skilled pilot could use it.
Groups:
Object Manipulation

Syntax

Syntax:
canMove unitName
Parameters:
unitName: Object
Return Value:
Boolean - true if the vehicle is able to move, false if not

Examples

Example 1:
if (not canMove _tank) then { player sideChat "He's nailed on the ground! Now hurry!"; };

Additional Information

See also:
canFirecanStand

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