90 void pushNetworkState(
float engine_rpm,
float acc,
float clutch,
int gear,
bool running,
bool contact,
char auto_mode,
char auto_select = -1);
Binding of RoR::EngineSim; A land vehicle engine + transmission.
void autoShiftSet(autoswitch mode)
void setTCaseRatio(float ratio)
Set current transfer case gear (reduction) ratio.
void shiftTo(int val)
Changes gear to given value. Plays sounds.
SimGearboxMode getAutoMode()
void startEngine()
Quick engine start. Plays sounds.
float getIdleRPM() const
('engoption' attr #8)
float getAccToHoldRPM()
estimate required throttle input to hold the current rpm
void setClutch(float clutch)
int getKickdownDelayCounter()
void setManualClutch(float val)
char getEngineType() const
't' = truck (default), 'c' = car, 'e' = electric car ('engoption' attr #2)
float getEngineTorque() const
Torque in N/m ('engine' attr #3)
float getShiftTime() const
Time (in seconds) that it takes to shift ('engoption' attr #4)
float getGearRatio(int pos)
-1=R, 0=N, 1... ('engine' attrs #5[R],#6[N],#7[1]...)
void setGear(int v)
low level gear changing (bypasses shifting logic)
float getPostShiftTime() const
Time (in seconds) until full torque is transferred ('engoption' attr #6)
float getClutchTime() const
Time (in seconds) the clutch takes to apply ('engoption' attr #5)
float getClutchForce() const
('engoption' attr #3)
float getBrakingTorque() const
float getDiffRatio() const
Global gear ratio ('engine' attr #4)
int getUpshiftDelayCounter()
float getWheelSpin()
Current wheel RPM.
float getEngineInertia() const
('engoption' attr #1)
autoswitch getAutoShift()
void stopEngine()
stall engine
float getPostShiftClock()
void setWheelSpin(float rpm)
float getMaxIdleMixture() const
Maximum throttle to maintain the idle RPM ('engoption' attr #9)
void setAutoMode(SimGearboxMode mode)
bool hasContact()
Ignition.
void setGearRange(int v)
low level gear changing (bypasses shifting logic)
int getNumGearsRanges() const
void shift(int val)
Changes gear by a relative offset. Plays sounds.
void setHydroPump(float work)
void toggleContact()
Ignition.
float getShiftDownRPM() const
Shift down RPM ('engine' attr #1)
float getMinIdleMixture() const
Minimum throttle to maintain the idle RPM ('engoption' attr #10)
float getAutoShiftBehavior()
float getShiftUpRPM() const
Shift up RPM ('engine' attr #2)
float getEnginePower(float rpm)
void offStart()
Quick start of vehicle engine.
void autoSetAcc(float val)
void pushNetworkState(float engine_rpm, float acc, float clutch, int gear, bool running, bool contact, char auto_mode, char auto_select=-1)
float getStallRMP() const
('engoption' attr #7)
Pseudo-namespace; it doesn't exist in code or script runtime, only in this documentation.
autoswitch
Binding of RoR::autoswitch, used with Script2Game::EngineClass.