set_max_speed
Sets a live unit’s maximum speed.
Function
Synopsis
btech.unit.set_max_speed( unit, movement_points )
Arguments
DbRef|Object unit- The live unit.
number movement_points- The new maximum speed in movement points, from 0 to 10000.
Returns
None.
Notes
After setting the limit, this function corrects the unit’s movement state. If necessary, it immediately clamps the desired and current speeds to the new maximum and recalculates cargo weight.