If................Then

Capt_Haddock

New member
If….Then

Is there a way of inserting an “If…Then” statement into a driver schedule?

I have worked out a simple way of banking consists by sending the object train driver to the drivable signal box and then giving control of the object train to the banking locomotive until it reaches the top of the bank and uncouples, at this point the driver rejoins his trains and continues the schedule, (picking up on a suggestion on this forum).

I would like to be able to extend the banking loco’s schedule so that it can pick up trains from more than one location. The schedule would look something like: -

If a train passes trigger A, then - banking schedule A; If a train passes trigger B then banking schedule B. The wait for trigger command does not allow for more than one trigger to fire the rest of the schedule.

Any suggestions?

Chris
 
There is a "work-around" to If-Then by using the "Variables" rules.

Have you tried using the 'Driver Schedule' rule? With this you can split up a schedule and could use it as a child of the related trigger.
 
Thanks for your replies, however I have just stumbled upon something could be the answer.

Pguy has “coupleattrackmarklist” Kuid 61392:2003:2 on the DLS. This will couple an engine to the first occupied trackmark on a list, which is all I am looking for.

Now I’ve just got to persuade those wretched A1 drivers to actually drive to a trackmark and not just stop with the consist half in and half out of the siding.

Thanks again

Chris
 
I have this pretty long route which I intend to release soon, and this yard in the center. I'm thinking, trains from the North portals stop at the central station, trigger a trigger and park somewhere in the yard. Another fresh locomotive triggered by the trigger goes out, backs up to the consist, and continues to the South portals. Anyone knows how to do this?
 
Nicky
The schedule for your train travelling from the north will need to include “uncouple at trackmark” and “drive to trackmark” to uncouple and park its loco. The route to the second trackmark should include a trigger. The new loco will “wait for trigger” and then “couple at trackmark” to pick up the consist and take it on its way. In this system the reverse process could also be applied so that north bound trains also experience a loco change.

Hope this helps

Chris
 
Ahh, it works like a charm. The AI lads seem to be behaving well. I figured it wouldn't be practical to have a loco uncouple, go top up on coal and water, then couple back to the train. Too time consuming, although I'm not sure if they do this is real life.
 
I have this pretty long route which I intend to release soon, and this yard in the center. I'm thinking, trains from the North portals stop at the central station, trigger a trigger and park somewhere in the yard. Another fresh locomotive triggered by the trigger goes out, backs up to the consist, and continues to the South portals. Anyone knows how to do this?
In a TRS2006 route under construction I wanted a train to pull into the terminus and for another loco to couple to the rear to take the coaches off on the return journey. To my surprise it works. When the first train has stopped and loaded passengers, uncouple the loco. The second loco, either after a trigger or wait command, couples to the last coach, and the first loco does not re-attach even if there is some movement of the coaches towards it. The second loco takes the coaches away and after a wait command the first loco goes off to a siding or empty rake.
Any help?
Roger
 
There is a "work-around" to If-Then by using the "Variables" rules.

Natvander any chance of a short explanation of how to use the variables rule for this as I have always want some for of an "IF THEN" rule.

What I want to use it for is in passing loops, ie: if next section is clear pass through loop on main, if not pull into loop.

Any thoughts

Cheers
 
Natvander any chance of a short explanation of how to use the variables rule for this as I have always want some for of an "IF THEN" rule.

What I want to use it for is in passing loops, ie: if next section is clear pass through loop on main, if not pull into loop.

Any thoughts

Cheers

You need to set up a variable (Show Variable) - lets call it "Section".

Next you need to add a method to modify that variable so that if the section is not clear then 1 is added to the variable. For example, you could set triggers at each end and, under a trigger check rule have Variable Modify - change section to 1.

Then you have a Check Variable rule - if variable 1, set junctions so train goes in the loop, if 0 set for the main.

That's a very basic rundown, but I hope it helps.
 
I do it the simple way; make two tracks, and throw in directional markers. This way cornfield meets are virtually impossible. A little unprototypical though, but I found that the simpler the route or how a session is programmed, the lesser the chance of the AI messing up.
 
Back
Top