getCruiseControl: Difference between revisions

From Bohemia Interactive Community
(Created page with "{{RV|type=command |game1= arma3 |branch= dev |version1= 2.06 |arg= local |eff= local |descr= Returns cruise control settings set with setCruiseControl command. |gr1...")
 
(improved return value formatting for parser)
 
(5 intermediate revisions by 2 users not shown)
Line 2: Line 2:


|game1= arma3
|game1= arma3
|branch= dev
|version1= 2.06
|version1= 2.06


Line 19: Line 16:
|s1= [[getCruiseControl]] vehicle  
|s1= [[getCruiseControl]] vehicle  


|p1= vehicle: [[Object]] - The vehicle
|p1= vehicle: [[Object]] - the vehicle


|r1= [[Array]] in format:
|r1= [[Array]] with [speedLimit, cruiseControlActive]
* 0: [[Number]] - Defined speed limit
* speedLimit: [[Number]] - defined speed limit
* 1: [[Boolean]] - [[true|True]] if cruise control is enabled, [[false]] if only speed was limited
* cruiseControlActive: [[Boolean]] - [[true]] if cruise control is enabled, [[false]] if only speed was limited


|x1= <code>[[getCruiseControl]] [[vehicle]] [[player]] [[params]] ["_speedLimit", "_cruiseControlActive"];</code>
|x1= <sqf>getCruiseControl vehicle player params ["_speedLimit", "_cruiseControlActive"];</sqf>


|seealso= [[setCruiseControl]] [[limitSpeed]] [[forceSpeed]] [[setAirplaneThrottle]]
|seealso= [[setCruiseControl]] [[limitSpeed]] [[forceSpeed]] [[setAirplaneThrottle]]
}}
}}

Latest revision as of 17:56, 4 January 2026

Hover & click on the images for description

Description

Description:
Returns cruise control settings set with setCruiseControl command.
Groups:
Unit ControlObject Manipulation

Syntax

Syntax:
getCruiseControl vehicle
Parameters:
vehicle: Object - the vehicle
Return Value:
Array with [speedLimit, cruiseControlActive]
  • speedLimit: Number - defined speed limit
  • cruiseControlActive: Boolean - true if cruise control is enabled, false if only speed was limited

Examples

Example 1:
getCruiseControl vehicle player params ["_speedLimit", "_cruiseControlActive"];

Additional Information

See also:
setCruiseControl limitSpeed forceSpeed setAirplaneThrottle

Notes

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