Hi, I want to run a script in a QD. So I have placed a train on an unused siding in the scenario and specified the same track as the destination for this train. In this way, I can open the timetable editor and access the scenario part. I compiled my scenario script (LUAC and MD5) and hoped that it would work. There are triggers in the track that send a message to the scenario script. The triggers do this using SysCall("ScenarioManager:TriggerDeferredEvent" (which works perfectly in timetable scenarios), but the scenario script remains silent in the QD scenario. Does anyone have any ideas? Thanks, Jan
Please post a screenshot of the editor with the timetable of that train opened. I might be wrong, but I don't think adding a normal timetable to a train will work in QD, as it has fixed timings and would need a starting time, which doesn't exist in a QD template.
That's not my real problem. This train moves a few metres when the Quicktime happens to take place at 12:00. Otherwise it stands there and waits for 12:00. The train was only set so that I can access the timetable tool to activate a scenaroscript. My problem is the scenario script, which apparently doesn't do it and I don't know why.
QuickDrive scenarios are generated from a template every time a user starts one. Putting in a script into the template will not copy it over to the generated scenario folder ( that gets deleted with the next start of TS or with a new QD run).
There could be a way though - just like SAD or Armstrong Powerhouse use special track-linked trigger assets for weather change - so your script is tied to an asset not to a timetable. You could modify such an existing asset to your needs (directing to your script in an asset folder) and put it in your QD template. If your train passes such a trigger a script will be executed. Example (Brennitzer Linienstern): This is an asset of class "ScriptableSceneryBlueprint", which just needs the <ScriptComponent> pointing to your script. You can set up your script that it accepts parameters given in the object properties flyout (here: WEATHER_RAINBOW)
Thank you very much, but that doesn't help. Firstly, this blueprint is not bound to the track. So I can't tell the script a parameter such as the station name. So I would have to create a separate trigger for each station. Bollocks I have another idea in mind: Is there a value that a script can use to recognise that the current scenario is a QD scenario? I have triggers in the track that are of no use at the moment because I can't give the QD a scenario script. But if there is a constant that I could evaluate in the track trigger and that tells it that it is a QD, I would be a huge step further.
Kim Olesen may be able to provide some assistance here, He has made some really advance quick drives that use scripts i believe.
This IS a track linked trigger, it's just not visible in the shot because the flyout is active, and is the only way you can achieve what you want. It's not that hard creating these and placing these at each station in your QD template, but I don't know exactly what you want to do. A QD scenario is actually a Standard scenario that gets created and saved in the route folder when you hit the Play button.
My Real Drives actually does not use any scripts. They use invisible trains to trigger random red signalling in the path of the player train.