combatPace: Difference between revisions

From Bohemia Interactive Community
(Created page with "{{RV|type=command |game1= arma3 |version1= 2.22 |arg= local |gr1= Object Manipulation |descr= Sets or gets the combat pace for the local player. If the right-hand array is empty, the command will simply act as a getter. |s1= soldier combatPace [enable, duration] |p1= soldier: Object - The local player unit. |p2= enable: Boolean - (Optional, no default) Whether to enable or disable combat pace. |p3= duration: Scalar - (Optional, default -1) Duration...")
 
No edit summary
Line 18: Line 18:
|r1= [[String]] - previous combat pace. Possible values: "None", "Timer", "Toggle"
|r1= [[String]] - previous combat pace. Possible values: "None", "Timer", "Toggle"


|x1= <sqf>private _isCombatPaceToggled = player combatPace [] == "Toggle";</sqf>
|x1= <sqf>private _isCombatPaceToggled = player combatPace [] == "Toggle"; // current combat pace is toggled</sqf>


|x2= <sqf>private _isInCombatPace = player combatPace [] != "None"</sqf>
|x2= <sqf>private _isInCombatPace = player combatPace [] != "None"; // either using timer or toggled combat pace</sqf>


|x3= <sqf>player combatPace [false]; // disables combat pace (both short and toggle)</sqf>
|x3= <sqf>player combatPace [false]; // disables combat pace (both short and toggle)</sqf>

Revision as of 19:48, 14 March 2026

Hover & click on the images for description

Description

Description:
Sets or gets the combat pace for the local player. If the right-hand array is empty, the command will simply act as a getter.
Groups:
Object Manipulation

Syntax

Syntax:
soldier combatPace [enable, duration]
Parameters:
soldier: Object - The local player unit.
enable: Boolean - (Optional, no default) Whether to enable or disable combat pace.
duration: Scalar - (Optional, default -1) Duration of combat pace in seconds (maximum 5 seconds). If duration < 0, combat pace will be toggled. If duration >= 0, short combat pace will be used. duration == 0 means use the default short combat pace duration in config. Note that the combat pace modes are mutually exclusive (enabling one disables the other)
Return Value:
String - previous combat pace. Possible values: "None", "Timer", "Toggle"

Examples

Example 1:
private _isCombatPaceToggled = player combatPace [] == "Toggle"; // current combat pace is toggled
Example 2:
private _isInCombatPace = player combatPace [] != "None"; // either using timer or toggled combat pace
Example 3:
player combatPace [false]; // disables combat pace (both short and toggle)
Example 4:
player combatPace [true]; // enables combat pace toggle and disables timer mode
Example 5:
player combatPace [true, 1]; // disables combat pace toggle, enables timer mode for 1 second

Additional Information

See also:
forceWalk getSpeed

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note