Vehicle::setEngineTorqueMultiplier: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
Line 7: Line 7:
*'''Undefined'''
*'''Undefined'''
==Example==
==Example==
<div class="header" style="background-color: #AE4040; color: #FFFFFF; border: 2px solid #408DAE;">
<div style="margin: 10px 10px 10px 10px;"><b>Client-Side</b></div>
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
// todo
mp.events.add('render', () => {
    let vehicle = mp.players.local.vehicle;
    vehicle.setEngineTorqueMultiplier(1.5); // Multiplies by 1.5 the engine torque
});
</syntaxhighlight>
</syntaxhighlight>
</div>
==See also==
==See also==
{{Vehicle_function_c}}
{{Vehicle_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Revision as of 23:16, 4 April 2018

<1.0 - Decreased torque
=1.0 - Default torque
>1.0 - Increased torque

Negative values will cause the vehicle to go backwards instead of forwards while accelerating.

value - is between 0.2 and 1.8 in the decompiled scripts.

This needs to be called every frame to take effect.

Syntax

vehicle.setEngineTorqueMultiplier(value);

Required Arguments

  • value: float

Return value

  • Undefined

Example

Client-Side
mp.events.add('render', () => {
    let vehicle = mp.players.local.vehicle;
    vehicle.setEngineTorqueMultiplier(1.5); // Multiplies by 1.5 the engine torque
});

See also