Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.



Introduced in

Version:1.00

Description

Description:

Forces the speed limit (in mkm/sh) on the given object (the object never attempts to move faster than specified by forceSpeed). Use a negative value to return to default behavior.

To convert to m/s, use these factors: km/h * 0.278, mph * 0.447

Syntax

Syntax:object forceSpeed speed
Parameters:
  • object: Object - Object whose speed limit is forced.
  • speed: Number - Speed limit (in mkm/sh).
Return Value:Nothing

Examples

Examples:
_helicopter forceSpeed 150

Additional Information

See also: getForceSpeed, setMaxSpeedLimit, limitSpeed, setSpeedMode
Multiplayer:
Problems:

Notes







Posted on May 31, 2011
Kronzky
In the current implementation (V1.40+) the effect of forceSpeed is fairly unpredictable, and depends on which type of vehicle or unit is being used. Some vehicles interpret the speed given as km/h, some as m/s, and some as something else altogether.
For units, due to their animation limitations, there is no smooth transition from one speed to another, but the changes happen in larger steps. Also, some unit types may have more speed modes available than others.
While it is possible to manipulate the speeds of vehicles and units via this command, before applying it in a mission, make sure to verify the specific effects on the relevant objects before deployment.



Posted on 17:02, 2 March 2007 (CET)
Donnervogel
Setting forceSpeed to -1 will make the unit move according to the group speed mode (often specified by the waypoint) again. Setting forceSpeed to 0 will halt the unit ignoring waypoints or orders.