Debating best way to activate an AI train

crisger

RR Mod Maker
I have very simple needs re AI trains for a session ...just have it be placed ..activate on a trigger and run a bit and then vanish.

I am slowly grasping how the rules window works ..and my option at this time seems to be to place the train on the route after i place the player train, and then add a WAIT FOR rule in the queue after the initial start up stuff, with a child command to Navigate to....linked to a trigger that the player train will fire when it passes over it approaching the AI location....and then have the AI navigate to a marker where i can stop it with a STOP command or place a Portal for it to go away?

does this make sense or is there a better way?

i see i will have to carefully limit the number of AI consists to make the rule Queue not go nuts. and as i understand it it wont matter actually where i put the rules for the AI in the actual rules window as the TANE is checking all of the rules all of the time. i was confused for a while thinking it was linear and I had to place all of the stuff to happen in some kind of sequence like you see it in the rules window that runs during a session at the bottom of the screen.

thanks for help on this, ...my slow dim brain is gradualy grasping how this session stuff works. with a lot of help from the gang here.

Chris
 
Hi Chris
You start by saying AI trains (plural) then finish your sentence in the singular, so a little confused.
AI will act on exactly what you program them for. The initial order "wait for xx"(xx being seconds), is there so that it gives time to allow all consists to be placed by T:ane startup procedures.
In Surveyor mode, top of page go to "Edit Session Rules" >select "Driver Set Up" and click on "Edit" (You'll find edit at the bottom of the popup box.)
Now you will have a list of all your AI trains and their auto allocated drivers.

Select the train you want to edit and start adding in sequence any orders you want that particular train to follow.
The first will be wait for xx seconds to give your program time to fully load.

If you now put "wait for trigger" (Which can be set to several variants "activated by any train" or "activated by designated train")
Not until that trigger is activated will your AI move on to the next order. Possibly a "drive to" or whatever.

When you want your train terminated send it to a portal,..........................or drive it of the cliff top ..........:hehe:

If you have several AI trains doing pretty much the same thing at different intervals you might consider using the "library" Place train orders in the library schedule and simply copy those to any train you need to by a simple one off train order of "get from library"

Hope that goes some way to answering your present needs
Kind Regards
John P.
 
Last edited:
I do it without the "wait for xx seconds" rule, but except for that do it exactly as parryjc described.

If you prefer to see an example, download this session:
kuid2:645812:97706:2 Coal for Charlescrossing
All but one of the AI trains in that session do what you want: Wait for a trigger followed by driving somewhere.
If you do that in TS12, it will be a very tiny download as almost all the dependencies are built-in.
 
Back
Top