Function
Moderate
VehicleWheeled:SetEngineSetup
Configures the Vehicle Engine (Torque, RPM, Braking)
Syntax
my_vehicle_wheeled:SetEngineSetup(max_torque = 700, max_rpm = 5700, idle_rpm = 1200, brake_effect = 0.05, rev_up_moi = 5, rev_down_rate = 600, torque_curve = {
0: 0.0,
max_rpm * 0.2: 0.9,
max_rpm * 0.4: 1.0,
max_rpm * 0.8: 0.8,
max_rpm: 0.0
})
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
max_torque
optional
|
integer | 700 |
Max Engine Torque (Nm) is multiplied by TorqueCurve |
max_rpm
optional
|
integer | 5700 |
Maximum revolutions per minute of the engine |
idle_rpm
optional
|
integer | 1200 |
Idle RMP of engine then in neutral/stationary |
brake_effect
optional
|
float | 0.05 |
Braking effect from engine, when throttle released |
rev_up_moi
optional
|
integer | 5 |
Affects how fast the engine RPM speed up |
rev_down_rate
optional
|
integer | 600 |
Affects how fast the engine RPM slows down |
torque_curve
optional
|
table | {
0: 0.0,
max_rpm * 0.2: 0.9,
max_rpm * 0.4: 1.0,
max_rpm * 0.8: 0.8,
max_rpm: 0.0
} |
Map defining the torque [Normalized 0..1] for a given RPM |