COMMUNITY FORUM

Motor Engine Control

Forum Overview >> Farming Simulator 19

CategoryFarming Simulator 19
Created23.08.2019 17:02


Bio Medical Extetion (Unknown) 23.08.2019 17:02
Hi, need a simple script to turn on and off the engine vehicles, thx

Bilbo Beutlin (BBeutlin) 23.08.2019 20:58
Why? In game settings you can set autom. motor start on/off.

Bio Medical Extetion (Unknown) 24.08.2019 12:55
I need to turn off engine automatically after 2 min at speed 0.

I need the attribute name to get the current vehicle speed

I found only RPM value:

local currRPM = self.spec_motorized.motor.lastMotorRpm;


Bilbo Beutlin (BBeutlin) 24.08.2019 20:29
See for reference "vehicle.lua".
You can use the variable 'vehicle.lastSpeed' (per second) or the function 'vehicle:getLastSpeed()' (per hour).

This you check over desired period and then call 'vehicle.spec_motorized:stopMotor()'.

On the other hand you can use game option "auto motor start OFF" and set the time to stop motor in "gameSettings.xml" <motorStopTimerDuration> [millisecond].


Note: Log in to post. Create a new account here.