setCruiseControl: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Add details) |
Lou Montana (talk | contribs) m (Text replacement - " |descr=" to " |branch= dev |descr=") |
||
Line 6: | Line 6: | ||
|arg= local | |arg= local | ||
|eff= local | |eff= local | ||
|branch= dev | |||
|descr= Limits or set a player-controlled vehicle's speed through cruise control. {{Feature|important|This command only works: | |descr= Limits or set a player-controlled vehicle's speed through cruise control. {{Feature|important|This command only works: |
Revision as of 13:14, 21 May 2021
Description
- Description:
- Limits or set 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. Negative values for reverse gear speed
- 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
- Example 3:
vehicle player setCruiseControl [-5, true]; // will make the vehicle go backwards
- Example 4:
vehicle player setCruiseControl [-5, false]; // will make the vehicle go backwards too (speed cannot be over -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