Garry's Mod Wiki

Revision Difference

Structures/VehicleParamsEngine#549579

<cat>struct</cat> <structure> <realm>Server</realm> <description>The structure used by <page>Structures/VehicleParams</page>.</description> <fields> <item name="autobrakeSpeedFactor" type="number"></item> <item name="autobrakeSpeedGain" type="number"></item> <item name="axleRatio" type="number">This acts as the final ratio of the gearbox. It's like a master coefficient of the gearbox.</item> <item name="boostDelay" type="number">Amount of seconds between being able to use the boost ( by pressing Shift key by default )</item> <item name="boostDuration" type="number">Duration of the boost in seconds</item> <item name="boostForce" type="number"></item> <item name="boostMaxSpeed" type="number">Maximum speed while boosting <warning>The <page>Vehicle:SetVehicleParams</page> function takes this in **miles per hour**, but <page>Vehicle:GetVehicleParams</page> returns this in **hammer units per second**! 1 MPH is roughly 17.6 HU/s.</warning></item> <item name="gearCount" type="number">Amount of gears this vehicle has.<note>Cannot be set.</note></item>⤶ <item name="gearCount" type="number">Amount of gears this vehicle has.</item>⤶ <item name="gearRatio" type="table">A table of numbers, of gear rations. Table length is equal to "gearCount" member of this table.</item> <item name="horsepower" type="number">The HP amount of the vehicle This value is used to calculate the effectively applied torque, along with ratios and `maxRPM`.</item> <item name="isAutoTransmission" type="boolean">If `true`, the gearbox shifts gears, if `false` the gearbox stays stuck to the 1st gear (gear number 0).</item> <item name="maxRPM" type="number">Maximum RPM of the vehicle. Despite this being a maximum value, the vehicle can exceed it. <warning>Attempts to exceed the max RPM will force the active gear ratio to be that of the 1st gear, which will provide even more torque. This is the opposite of a rev limiter. This value is only used for the calculation of the effectively applied torque.</warning></item> <item name="maxRevSpeed" type="number">Maximum reverse speed of the vehicle <warning>The <page>Vehicle:SetVehicleParams</page> function takes this in **miles per hour**, but <page>Vehicle:GetVehicleParams</page> returns this in **hammer units per second**! 1 MPH is roughly 17.6 HU/s.</warning></item> <item name="maxSpeed" type="number">Maximum forward going speed of the vehicle without boosting <warning>The <page>Vehicle:SetVehicleParams</page> function takes this in **miles per hour**, but <page>Vehicle:GetVehicleParams</page> returns this in **hammer units per second**! 1 MPH is roughly 17.6 HU/s.</warning></item> <item name="shiftDownRPM" type="number">Amount of RPM to automatically shift one gear down</item> <item name="shiftUpRPM" type="number">Amount of RPM to automatically shift one gear up</item> <item name="throttleTime" type="number"></item> <item name="torqueBoost" type="boolean"></item> </fields> </structure>