Garry's Mod Wiki

VehicleParamsEngine

Description

The structure used by Structures/VehicleParams.

Parameters

autobrakeSpeedFactor [number]

autobrakeSpeedGain [number]

axleRatio [number]

This acts as the final ratio of the gearbox.

It's like a master coefficient of the gearbox.

boostDelay [number]

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

boostDuration [number]

Duration of the boost in seconds

boostForce [number]

boostMaxSpeed [number]

Maximum speed while boosting

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.

gearCount [number]

Amount of gears this vehicle has

gearRatio [table]

A table of numbers, of gear rations.

Table length is equal to "gearCount" member of this table.

horsepower [number]

The HP amount of the vehicle

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

isAutoTransmission [boolean]

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

maxRPM [number]

Maximum RPM of the vehicle.

Despite this being a maximum value, the vehicle can exceed it.

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.

maxRevSpeed [number]

Maximum reverse speed of the vehicle

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.

maxSpeed [number]

Maximum forward going speed of the vehicle without boosting

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.

shiftDownRPM [number]

Amount of RPM to automatically shift one gear down

shiftUpRPM [number]

Amount of RPM to automatically shift one gear up

throttleTime [number]

torqueBoost [boolean]

Page Links


Special Pages


Wikis

?

Render Time: 391ms

DB GetPage 99
Generate Html 25
SaveChanges (1) 249
Render Body 0
Render Sidebar 15