Author Message

amilmand

00
Posts: 259

Location: ---
Occupation:
Age:
V$:
#138197   2018-03-02 22:23          
The speed can be set by the setvel command detailed and exemplified on the previous page LINK
The rpm will be conform with the new velocity if the tyres got traction.
Though setting the rpm directly will not work because the game-engine will overwrite the data you force on it.

However you can simulate the behaviour by setting the throttle strength with a script like:
RawEdit.setF(player.car.chassis.getIndexedAddr(Chassis.IndexedData_ThrottleStrength),10);
mind you this value is supposed to be in the range of [0-1] nevertheless the game accepts and handles extreme values relatively well (setting it to some obscene amount will brake the engine for example, but if you set it to like 10 the engine wont brake it will just simulate the possibility that you can press the throttle actually through the floor if this makes sense)

But this value again will be overwritten by the engine the next frame but will fall of from where you set it so if you set the throttle value the engine will rev up and rev down normally as if you released the pedal, you would need to set this actively (every frame or similarly) to simulate a pressed state but I think that is logical.