setCruiseControl: Difference between revisions
Jump to navigation
Jump to search
(Remove invalid examples, clarify forwards only) |
m (fixed some typos and inconsistencies) |
||
Line 2: | Line 2: | ||
|game1= arma3 | |game1= arma3 | ||
|branch= dev | |||
|version1= 2.06 | |version1= 2.06 | ||
|arg= local | |arg= local | ||
|eff= local | |eff= local | ||
|descr= Limits or sets a player-controlled vehicle's speed through cruise control. {{Feature|important|This command only works for: | |||
* The local player | |||
|descr= Limits or | * CarX, TankX and ShipX simulated vehicles | ||
* | * Forward speeds (positive ''speed'') | ||
* | |||
* | |||
}} | }} | ||
Line 21: | Line 23: | ||
|s1= vehicle [[setCruiseControl]] [speed, autoThrust] | |s1= vehicle [[setCruiseControl]] [speed, autoThrust] | ||
|p1= vehicle: [[Object]] - | |p1= vehicle: [[Object]] - The vehicle to limit | ||
|p2= speed: [[Number]] - | |p2= speed: [[Number]] - Desired/top speed in km/h. 0 to disable any setting. Only positives values are valid, negative values will make the vehicle unable to move forward | ||
|p3= autoThrust: [[Boolean]] | |p3= autoThrust: [[Boolean]] | ||
* [[true]] - | * [[true]] - Cruise control. The vehicle will maintain this speed until brakes is applied or driver dies or leaves the vehicle | ||
* [[false]] - | * [[false]] - Speed limiter. The vehicle will not accelerate above set speed | ||
|r1= [[Nothing]] | |r1= [[Nothing]] |
Revision as of 16:29, 26 May 2021
Description
- Description:
- Limits or sets a player-controlled vehicle's speed through cruise control.
- Groups:
- Unit ControlObject Manipulation
Syntax
- Syntax:
- vehicle setCruiseControl [speed, autoThrust]
- Parameters:
- vehicle: Object - The vehicle to limit
- speed: Number - Desired/top speed in km/h. 0 to disable any setting. Only positives values are valid, negative values will make the vehicle unable to move forward
- autoThrust: Boolean
- Return Value:
- Nothing
Examples
- Example 1:
vehicle player setCruiseControl [50, true]; // sets cruise control to 50 km/h
- Example 2:
vehicle player setCruiseControl [5, false]; // limits player's vehicle speed to 5 km/h
Additional Information
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