RudolfJan wrote:You may want to have a look at the Scenario scripting guide in te download section. It will not answer your question, but I hope it encourages you to do some experiments and share the results
I downloaded it, read through it and I figured it out just this morning
In the lua script you have to type in the following lines after setting up an event:
if event == "(customized name here)" then -- kill engine (I don't think you have to type in "-- kill engine" here; more likely it's just a note for the programmer)
SysCall ( "PlayerEngine:SetControlValue", "Startup", 0, -1);
return TRUE
end
After that compile your MD5s to link the event to the scenario, play through your scenario and activate your event. As you pass through where the event takes place the emergency bells go off in the cab, the prime mover falls silent and on the F4 HUD rpm steadily drops to 0. You can restart your engine by pressing "Z" on the keyboard.
One thing to keep in mind: when running with multiple engines the SysCall will shut off your engine and while you are in control of that engine it will shut off the other engines in the consist. But if you switch controls to a different loco in the consist the all of the engines will turn on again. If you switch back to your original engine then they'll all shut off again. Perhaps to shut off all the others where it says "PlayerEngine" replace it with the other loco's numbers (so if I was driving loco 4569 that would be "PlayerEngine"; if my 2nd engine in the consist was 4723 then type in "4723:SetControlValue" etc. in the next line). I haven't tested that out yet but I probably will in the future.