Repeating AI Commands

PortLineParker

UK Route Builder
Hi all,

Apologies if this has been asked before, I did search but didn't find anything, probably because I'm not sure of the correct terminology.

My question is this; is there a way to save a set of repeat commands as a single command for AI to follow?

What I mean is this - instead of setting the AI to "Sound horn, drive to X, wait for X minutes, sound guards whistle, sound horn, drive to X, wait for X minutes" etc every time, is there a way to save a set of commands such as this as one master command? So that you could, in theory, have 'Drive A to C via B' as one rule?

It would save time and also help in case I forget anything - otherwise it can take a long time to set the AI up for each session, especially with multiple trains!

Cheers,

PLP
 
Use the Repeat command. This has to be the last command in a list and will force each command, as it is completed, to be added to the end of the list so it and the entire sequence of commands will be repeated (endlessly) instead of simply being deleted.

Details can be found at https://online.ts2009.com/mediaWiki/index.php/How_to_Use_Driver_Setup_Rule#The_.22Repeat.22_Command

Combine this with the Schedule Rule to allow you to build a library of repeating commands for use as required. They can be copied between sessions.
 
Last edited:
Another option is to use the Schedule Library rule. You create a schedule containing the sequence of commands you want to use. Then for a given driver, you add the command 'Copy commands from..', referencing the name of your library schedule. You can use this across multiple drivers if required.

If you take a look at any of the sessions created for the Dearnby & District route (any version), you will see examples of the Schedule library being employed.
 
Ah thanks Vostrail, that sounds like the very thing I could be after. I'll have a look at them all ad I haven't had time yet but I'm sure one of the above methods will do it - thanks all!

Cheers,

PLP
 
Hi

Be careful that you don't use the repeat command with the schedule library. It can cause no end of problems as, after the first run through, it will repeat the main commands but will also add in the individual commands that have been inserted by the Schedule Library. You will then get a completely trashed schedule. Just use the Schedule Library without any repeat command to be on the safe side.

Regards

Brian
 
the combination of
<kuid2:192081:1:7> Copy Commands From
<kuid2:192081:12:5> Schedule Library


does just that (as Vostrail posted)
make the folowing command in the library:
stophorn: wait for X minutes, sound guards whistle, sound horn,
now 3 are joined in 1 block


in your driver commands list:
drive to X, copy commands from(insert)stophorn, drive to Y etc etc


<kuid2:75377:84:1> Load At, is driveto +load
 
Back
Top