"Wait For" command in Trainz 12 Surveyor

Is there any way to edit the "Wait For" command in Trainz 12 Surveyor? I would like to have it wait for (1) one second. I want to set up my session so the horn_start plays twice-one second apart.
 
Here you go:
  • Lookup this asset in Content Manager: WaitFor,<kuid:-3:10090>
  • Right-click on it and select "clone" so you get your own version of the asset.
  • Edit it (your own version that is) by pressing ctrl-shift-e; an explorer window will now open with the content of the asset.
  • Edit the "waitforcommand.gs" in notepad (or any other plain text edit, not being Word)
  • Lookup this piece of code:
    Code:
        if (train or !driver)
        {
          itemMenu.AddItem(strTable.GetString1("return_msg_seconds", "5"), me, "WaitForItem", "5");
  • Change that to this piece of code:
    Code:
        if (train or !driver)
        {
          itemMenu.AddItem(strTable.GetString1("return_msg_seconds", "1"), me, "WaitForItem", "1");
          itemMenu.AddItem(strTable.GetString1("return_msg_seconds", "5"), me, "WaitForItem", "5");
  • Save it, close it, close the explorer, commit the asset (I usually use ctrl-m for that)
Done.

Disclaimer:
Not tested this, but 95% sure this will do the trick.
I can not be held responsible if you screw stuff up ;).
 
There is a specific driver command called 'Wait one second' available on the Download Station ( if you specifically need it to wait one second (or use it several times for more than one second). The KUID for the command is <kuid2:400260:423248:1>


Shane
 
No problem - it's safer to use a specific driver command from the Download Station than editing/cloning a built-in command.

Shane
 
So, you set the wait for command. Run the session and it works as it should for hours. Save the session. Come back tomorrow and run the saved session. Sometimes, just sometimes, arriving to the wait for point, and the train sits there forever. Only way around this is to issue another wait for command and delete the frozen one. And next time you run the session it may happen again. I have tried solving the problem but it may happen any place to any train while other commands still work well. I know we have posted this already, but after so many "improvements" with SP's, we still have the problem. Somehow if you compose a run in "schedule library", the commands don't freeze and everything works as it should. Any suggestions?
 
Any suggestions?
Rewrite this command for support of saving and loading sessions.

This command uses thread for time expectation. And all threads disappear while you're unloading session. Saving parametres occures only in function "SetProperties".
 
Last edited:
Back
Top