Call of Duty 4: Scripting Reference - Vehicles::SetSpeedImmediate

From COD Modding & Mapping Wiki
Share/Save/Bookmark
Jump to: navigation, search


SetSpeedImmediate( <speed>, <acceleration>, <deceleration> )

Module: Vehicles

Summary:

Sets the speed and acceleration for this vehicle instantaneously. Direction will be toward the goal direction if there is a goal, otherwise the current direction.


Call this on: a vehicle

Example:

self SetSpeedImmediate(60, 15, 5);

Required arguments:

  1. <speed> The speed of the vehicle in miles per hour


Optional arguments:

  1. <acceleration> The acceleration of the vehicle in miles per hour per second
  2. <deceleration> Deceleration. If not specified, set to be equal to half of accleration


Notes:

none