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

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


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

Module: Vehicles

Summary:

Sets the speed and acceleration for this vehicle.


Call this on: a vehicle

Example:

self SetSpeed( 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