setCruiseControl: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " |descr=" to " |branch= dev |descr=") |
(Remove invalid examples, clarify forwards only) |
||
Line 12: | Line 12: | ||
* for the local player | * for the local player | ||
* on CarX, TankX and ShipX simulated vehicles | * on CarX, TankX and ShipX simulated vehicles | ||
* with forward speeds | |||
}} | }} | ||
Line 22: | Line 23: | ||
|p1= vehicle: [[Object]] - the vehicle to limit | |p1= vehicle: [[Object]] - the vehicle to limit | ||
|p2= speed: [[Number]] - desired/top speed in km/h. 0 to disable any setting. | |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]] | ||
Line 33: | Line 34: | ||
|x2= <code>[[vehicle]] [[player]] [[setCruiseControl]] [5, [[false]]]; {{cc|limits player's vehicle speed to 5 km/h}}</code> | |x2= <code>[[vehicle]] [[player]] [[setCruiseControl]] [5, [[false]]]; {{cc|limits player's vehicle speed to 5 km/h}}</code> | ||
|seealso= [[getCruiseControl]] [[limitSpeed]] [[forceSpeed]] [[setAirplaneThrottle]] | |seealso= [[getCruiseControl]] [[limitSpeed]] [[forceSpeed]] [[setAirplaneThrottle]] | ||
}} | }} |
Revision as of 15:48, 26 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. 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