How to Control Junctions in Sessions
From TrainzOnline
Contents |
Junctions can be controlled by Session Rules during the running of a Session. |
The following applications give examples of using Session Rules to control junctions.
Application 1: Presetting Junctions
The Scenario: |
When a consist reaches a trigger, the junctions ahead are set and locked into position.
Rules Used: |
- Trigger Check Rule to trigger the event.
- Set Junctions Rule to set junctions.
Session Editor Screenshot: |
Description: |
- Line 1: Trigger Check The event is triggered when the consist reaches a trigger. This executes the following rule.
- Line 2: Set Junctions Sets selected junctions to set directions and specifies the level of control by the users and AI.
For example:-
Application 2: Asking the User to Set Junctions
The Scenario: |
A consist has been halted at a trigger placed in front of a junction. The user will be asked to set that junction and the following junction before the consist can proceed.
Preconditions: |
- Navigation Display Rule to create a navigation point set.
Rules Used: |
- Wait on Navigation Point Rule to trigger the event.
- Message Popup Rule to open a message window on the screen.
- Multiple Junction Alignment Check Rule to test if specified junctions are set correctly.
Session Editor Screenshot: |
Description: |
- Line 1: Wait on Navigation Point The event is triggered when the consist halts at the navigation point assigned to the trigger. This executes the following rules simultaneously
- Line 2: Message Popup Displays a message window asking that the next two junctions be manually set.
- Line 3: Multiple Junction Alignment Check tests the switch directions of the next two junctions and waits until they are aligned as specified.
Checking junction switch settings |
The following line is executed only if the junctions are set correctly
- Line 4: Message Popup Displays a message window stating that the junctions are now correctly set.
Trainz Wiki
- How to Guides
- Session Rules List (Alphabetical) with Parameters
- Session Rules List (Categories) With Parameters
Route Creation Tutorials:
Session Creation Tutorials:
- Adding Message Popups
- Adding Message Popups - Applications
- Adding Navigation Points
- Adding Navigation Points - Applications
- Configuring the Driver Setup Rule
- Controlling Signals in Sessions
- Creating a HTML Asset (Session Introduction Page and In Game Messages)
- List of Parent Rules
- Parent and Child Rules
- Using Track Triggers
- Using Variables in Sessions - Examples