canMove: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "Category:Scripting Commands ArmA2" to "Category:Scripting Commands Arma 2")
m (Fix description, example and clean comments)
Line 9: Line 9:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Returns if the given vehicle is still able to move. This command checks only the damage value, not the amount of fuel! |DESCRIPTION=
| Returns if the given vehicle is still able to move.
{{Informative |
* 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.
}} |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[Boolean]] <nowiki>=</nowiki> '''canMove''' unitName|SYNTAX=
| [[canMove]] unitName |SYNTAX=


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


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


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


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


Line 35: Line 35:
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on 08:17, 22 Juil 2016 (UTC)
 
<dt class="note">'''[[User:Pierre MGI|Pierre MGI]]'''
<dd class="note">
This command will return true for a car or a tank out of fuel, but false for an helicopter or a plane for the same condition.
<!-- Note Section END -->
<!-- Note Section END -->
</dl>
</dl>
Line 44: Line 41:
<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>


[[Category:Scripting Commands|CANMOVE]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.99|CANMOVE]]
[[Category:Scripting Commands OFP 1.46|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.96|CANMOVE]]
[[Category:Scripting Commands OFP 1.96|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.46|CANMOVE]]
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA|CANMOVE]]
[[Category:Scripting Commands ArmA|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Object_Information|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group: Object Information|{{uc:{{PAGENAME}}}}]]

Revision as of 23:38, 5 April 2020

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:
Uncategorised

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