# Structures/VehicleParamsEngine

(Difference between revisions)
Jump to: navigation, search

The structure used by VehicleParams structure.

Type Name Description
number autobrakeSpeedFactor
number autobrakeSpeedGain
number axleRatio

This acts as the final ratio of the gearbox.

It's like a master coefficient of the gearbox.

number boostDelay

Amount of seconds between being able to use the boost ( by pressing Shift key by default )

number boostDuration

Duration of the boost in seconds

number boostForce
number boostMaxSpeed

Maximum speed while boosting

 WARNING The Vehicle:SetVehicleParams function takes this in miles per hour, but Vehicle:GetVehicleParams returns this in hammer units per second! 1 MPH is roughly 17.6 HU/s.
number gearCount

Amount of gears this vehicle has

table gearRatio

A table of numbers, of gear rations.
Table length is equal to "gearCount" member of this table.

number horsepower

The HP amount of the vehicle

This value is used to calculate the effectively applied torque, along with ratios and maxRPM.

boolean isAutoTransmission

If true, the gearbox shifts gears, if false the gearbox stays stuck to the 1st gear (gear number 0).

number maxRPM

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.
number maxRevSpeed

Maximum reverse speed of the vehicle

 WARNING The Vehicle:SetVehicleParams function takes this in miles per hour, but Vehicle:GetVehicleParams returns this in hammer units per second! 1 MPH is roughly 17.6 HU/s.
number maxSpeed

Maximum forward going speed of the vehicle without boosting

 WARNING The Vehicle:SetVehicleParams function takes this in miles per hour, but Vehicle:GetVehicleParams returns this in hammer units per second! 1 MPH is roughly 17.6 HU/s.
number shiftDownRPM

Amount of RPM to automatically shift one gear down

number shiftUpRPM

Amount of RPM to automatically shift one gear up

number throttleTime
boolean torqueBoost