isWalking: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game name" to "|Game name=")
Line 3: Line 3:


| arma2oa |Game name=
| arma2oa |Game name=
|1.51|Game version=
|1.51|Game version=
|arg= global|Multiplayer Arguments=
|arg= global|Multiplayer Arguments=
____________________________________________________________________________________________
____________________________________________________________________________________________


| Returns [[true]] if walk is toggled (W+S in Arma 3). |DESCRIPTION=
| Returns [[true]] if walk is '''toggled''' (default W+S in {{arma3}}).
{{Informative | This command can still return true when the unit is sprinting or stopped; it only returns the '''toggle''' value of walking, not if the unit is walking right now.}} |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''isWalking''' unitName |SYNTAX=
| [[isWalking]] unitName |SYNTAX=


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


| [[Boolean]] |RETURNVALUE=
| [[Boolean]] |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code>_bool = [[isWalking]] [[player]];</code> |=  
|x1= <code>_bool = [[isWalking]] [[player]];</code> |Example1=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[forceWalk]], [[isForcedWalk]], [[forceSpeed]], [[getSpeed]] |SEEALSO=
| [[forceWalk]], [[isForcedWalk]], [[forceSpeed]], [[getSpeed]] |SEEALSO=
}}
}}



Revision as of 15:31, 4 September 2019

Hover & click on the images for description

Description

Description:
Returns true if walk is toggled (default W+S in Arma 3).
This command can still return true when the unit is sprinting or stopped; it only returns the toggle value of walking, not if the unit is walking right now.
Groups:
Uncategorised

Syntax

Syntax:
isWalking unitName
Parameters:
unitName: Object
Return Value:
Boolean

Examples

Example 1:
_bool = isWalking player;

Additional Information

See also:
forceWalkisForcedWalkforceSpeedgetSpeed

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

Posted on March 8, 2015 - 21:03 (UTC)
Benargee
To expand on the limited description, this command doesn't necessarily say whether or not the unit is currently walking. All it says is that walking is toggled on or off. This command can still return true when the unit is sprinting. When walking is toggled on, the unit will return to walking pace when not sprinting. When walking is toggled off, the unit will return to jogging pace when not sprinting. This command is not intended to gauge a units current movement speed.