Triggers and Rules

campchristie

New member
I'm new to Trainz and trying to figure out triggers by looking at the Garsdale Branch Active for an example. I'm locating the triggers, but when I view the details there is nothing in the window that pops up. How do you create the rules for a trigger, and is there another route that is a good example of how triggers work?

Thanks,
Scott
 
I think triggers are mostly used by adding rules like "TriggerCheck" or "WaitForTrigger" to the session info. (The screen where, at least in TS2010, you usually see Startup Options, Driver Setup, Driver Command, and other stuff.) It seems that you can do a bunch of stuff using child rules without actually having to write coded scripts. I took one of my existing (automated) routes, added a driverless locomotive and then added these two rules:
Code:
Wait for Derailment
   End Session

I made End Session a child of Wait for Derailment by using the "indent" button. (aka moving it right a space somewhat like my example above) Then did quick drive, selected that new locomotive and drove off the end of the track, and it booted me back to Surveyor once it went off the rails. I looked at an Avery Drexel session and there were a ton of rules setup like that.
 
The TRS2006 Sessions And Rules Guide is very useful reading, if tough going in places. It includes a lot of information about using triggers with rules. Although it was written for TRS2006, the principles are identical in all versions of Trainz from TRS2004 onwards.

HTH, John
 
Back
Top