Garry's Mod Wiki

Revision Difference

Structures/VehicleParamsEngine#517038

<cat>struct</cat> <structure> <description>The structure used by <page>VehicleParams</page>.</description> <fields> <item name="autobrakeSpeedFactor" type="number"></item> <item name="autobrakeSpeedGain" type="number"></item> {{StructureField|number|axleRatio|This acts as the final ratio of the gearbox. It's like a master coefficient of the gearbox. </fields>⤶ ⤶ </structure>⤶ ⤶ {{StructureField|number|boostDelay|Amount of seconds between being able to use the boost ( by pressing Shift key by default )}}{{StructureField|number|boostDuration|Duration of the boost in seconds}}<item name="boostForce" type="number"></item> {{StructureField|number|boostMaxSpeed|Maximum speed while boosting <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>⤶ }}{{StructureField|number|gearCount|Amount of gears this vehicle has}}{{StructureField|table|gearRatio|A table of numbers, of gear rations.⤶ ⤶ Table length is equal to "gearCount" member of this table.}}{{StructureField|number|horsepower|The HP amount of the vehicle⤶ ⤶ This value is used to calculate the effectively applied torque, along with ratios and `maxRPM`.}}{{StructureField|boolean|isAutoTransmission|If `true`, the gearbox shifts gears, if `false` the gearbox stays stuck to the 1st gear (gear number 0).}}{{StructureField|number|maxRPM|Maximum RPM of the vehicle.⤶ 1 MPH is roughly 17.6 HU/s.</warning></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>⤶ }}{{StructureField|number|maxRevSpeed|Maximum reverse speed of the vehicle <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>⤶ }}{{StructureField|number|maxSpeed|Maximum forward going speed of the vehicle without boosting 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>⤶ }}{{StructureField|number|shiftDownRPM|Amount of RPM to automatically shift one gear down}}{{StructureField|number|shiftUpRPM|Amount of RPM to automatically shift one gear up}}<item name="throttleTime" type="number"></item>⤶ 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>⤶ ⤶