How to Use Track Triggers
m (→Creating a Trigger Event) |
m |
||
Line 15: | Line 15: | ||
==='''Adding a Trigger'''=== | ==='''Adding a Trigger'''=== | ||
− | |||
− | |||
− | |||
− | |||
<table> | <table> | ||
Line 24: | Line 20: | ||
<td>[[file:TrackTriggerMode.JPG]]</td> | <td>[[file:TrackTriggerMode.JPG]]</td> | ||
<td><br> | <td><br> | ||
+ | The '''Track Trigger''' is placed on the track using:- | ||
+ | *the '''Tracks''' tool, and | ||
+ | *the '''Trackmark Mode''' button. | ||
*Select the '''Trigger Object''' from the list of installed objects | *Select the '''Trigger Object''' from the list of installed objects | ||
*Click the '''Add Object''' button | *Click the '''Add Object''' button | ||
Line 63: | Line 62: | ||
==='''Creating a Trigger Event'''=== | ==='''Creating a Trigger Event'''=== | ||
− | Trigger events are handled by the '''Trigger Check Rule''' which is added to a session in the '''Session Editor'''. | + | Trigger events are handled by the '''Trigger Check Rule''' which is added to a session in the '''Session Editor'''.<br> |
− | + | The Trainz Wiki Link '''[[Session_Rule_List_with_Parameters#Trigger_Check_Rule|Trigger Check Rule]]''' contains detailed information on this rule. | |
<table> | <table> | ||
Line 71: | Line 70: | ||
<td>[[file:EditSessionMenu.JPG]]</td> | <td>[[file:EditSessionMenu.JPG]]</td> | ||
<td><br> | <td><br> | ||
+ | To add the '''Trigger Check Rule''' to a session:- | ||
*Open the Session Editor from the '''Surveyor Main Menu'''. | *Open the Session Editor from the '''Surveyor Main Menu'''. | ||
− | |||
*Select the option '''Edit Session''' from the drop down menu list. | *Select the option '''Edit Session''' from the drop down menu list. | ||
</td> | </td> | ||
Line 81: | Line 80: | ||
<td rowspan="2">[[file:EditSessionWindowX.JPG]]</td> | <td rowspan="2">[[file:EditSessionWindowX.JPG]]</td> | ||
<td><br> | <td><br> | ||
− | *Click the '''Add''' button | + | *(left) Click the '''Add''' button |
− | + | *(below) Scroll down the list to select the '''Trigger Check''' rule | |
− | *Click the '''Tick''' icon. | + | *(below) Click the '''Tick''' icon. |
</td> | </td> | ||
</tr> | </tr> | ||
Line 106: | Line 105: | ||
<td rowspan="2">[[file:TriggerCheckProperties.JPG]]</td> | <td rowspan="2">[[file:TriggerCheckProperties.JPG]]</td> | ||
<td><br> | <td><br> | ||
− | *Click the '''''Add trigger''''' link | + | *(left) Click the '''''Add trigger''''' link |
+ | *(below) Select the trigger you have previously added | ||
+ | *(below) Click the '''Tick''' icon on the selection list | ||
</td> | </td> | ||
</tr> | </tr> | ||
Line 114: | Line 115: | ||
</tr> | </tr> | ||
</table> | </table> | ||
− | |||
− | |||
− | |||
− | + | *(above) Click the '''Tick''' icon '''Trigger Check''' properties window.<br><br> | |
− | + | ||
+ | ==='''Giving the Trigger Event a Purpose'''=== | ||
+ | To test your trigger event you will need to add at least one rule to the Trigger Check. | ||
+ | |||
<table> | <table> | ||
<tr valign="top"> | <tr valign="top"> | ||
<td rowspan="2">[[file:TriggerAddMesPopup.JPG]]</td> | <td rowspan="2">[[file:TriggerAddMesPopup.JPG]]</td> | ||
<td><br> | <td><br> | ||
+ | When you are back in the '''Session Editor''' window:- | ||
+ | *Click the '''Add''' button to add a new rule. | ||
*Scroll down the rule selection window to select the '''Message Popup''' rule | *Scroll down the rule selection window to select the '''Message Popup''' rule | ||
*Click the '''Tick''' icon. | *Click the '''Tick''' icon. | ||
Line 129: | Line 132: | ||
</tr> | </tr> | ||
<tr valign="top"> | <tr valign="top"> | ||
− | <td | + | <td> |
− | The '''Message Popup''' rule should now appear directly below the '''Trigger Check''' rule. The new rule will show a red cross because it has not yet been configured. | + | The '''Message Popup''' rule should now appear directly below the '''Trigger Check''' rule. <br> |
+ | [[file:MessagePopupAdded.JPG]]<br> | ||
+ | The new rule will show a red cross because it has not yet been configured. | ||
</td> | </td> | ||
</tr> | </tr> | ||
Line 141: | Line 146: | ||
<td rowspan="2">[[file:SessionRuleIndent.JPG]]</td> | <td rowspan="2">[[file:SessionRuleIndent.JPG]]</td> | ||
<td><br> | <td><br> | ||
− | *With the '''Message Popup Rule''' highlighted, click the '''''Indent''''' (''right arrow'') button. | + | *(left) With the '''Message Popup Rule''' highlighted, click the '''''Indent''''' (''right arrow'') button. |
+ | This should indent the '''Message Popup''' rule one level in (below).<br> | ||
</td> | </td> | ||
</tr> | </tr> | ||
Line 152: | Line 158: | ||
<br>The '''Message Popup Rule''' is now controlled by the '''Trigger Check Rule''' but it still has to be configured to show a message. | <br>The '''Message Popup Rule''' is now controlled by the '''Trigger Check Rule''' but it still has to be configured to show a message. | ||
− | |||
*With the '''Message Popup Rule''' highlighted, click the '''Edit''' button. | *With the '''Message Popup Rule''' highlighted, click the '''Edit''' button. | ||
<table> | <table> | ||
<tr valign="top"> | <tr valign="top"> | ||
− | <td | + | <td>[[file:MessagePopupText.JPG]]<br><br> |
− | <td><br>Set the properties as shown:- | + | The finished '''Message Popup'''.<br> |
− | *Check'''ON''' ''Close previous message popup windows'' | + | [[file:MessagePopupStop.JPG]] |
+ | </td> | ||
+ | <td><br>(left) Set the properties as shown:- | ||
+ | *Check '''ON''' ''Close previous message popup windows'' | ||
*Select '''Option Button''' ''Custom text'' | *Select '''Option Button''' ''Custom text'' | ||
*Enter a short text message (you are limited to about 6 lines of text) | *Enter a short text message (you are limited to about 6 lines of text) | ||
<br> | <br> | ||
To add an icon to the message:- | To add an icon to the message:- | ||
− | *Click the link ''click here to set'' and either | + | *(left) Click the link ''click here to set'' and either |
− | **scroll down the list to find a suitable icon (some will not be suitable), or | + | **(below) scroll down the list to find a suitable icon (some will not be suitable), or |
− | **simply type "icon stop" in the text box | + | **(below) simply type "icon stop" in the text box |
− | *Click the '''Tick''' icon.<br> | + | *(below) Click the '''Tick''' icon.<br> |
[[file:IconStop.JPG]] | [[file:IconStop.JPG]] | ||
</td> | </td> | ||
Line 173: | Line 181: | ||
</table> | </table> | ||
<br> | <br> | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
Again, click the '''Tick''' icon to exit the '''Message Popup Rule''' then exit the Session Editor.<br> | Again, click the '''Tick''' icon to exit the '''Message Popup Rule''' then exit the Session Editor.<br> | ||
Revision as of 23:49, 20 May 2018
Contents |
What are Triggers?
Triggers are invisible markers (invisible in Driver Mode but visible in Surveyor Mode) that are placed on a track. They can be programmed to "trigger an event" when a train (any train or a specific train) passes over them in Driver Mode.
The "event" is a message that is transmitted by the trigger to certain Session Rules that have been programmed to "listen" for the message. When one of those listening rules detects the message, it can be forced into action by executing preset instructions.
(left) A Track Trigger in place on a track visible in Surveyor Mode. The "5.00m" is the trigger detection radius |
Adding a Trigger
Configuring a Trigger
As soon as a new trigger has been placed, its properties window will open on the screen. It will be given a default name and assigned to the currently active layer.
Triggers have a "detection radius" that controls how close a train has to approach to trigger the event. The smaller the radius the closer the train. This radius is set in the Advanced Properties section of the Tools window.
|
Creating a Trigger Event
Trigger events are handled by the Trigger Check Rule which is added to a session in the Session Editor.
The Trainz Wiki Link Trigger Check Rule contains detailed information on this rule.
To add the Trigger Check Rule to a session:-
|
|
|
This will add the Trigger Check rule to the session.
|
For this example we will leave all settings unchanged and simply identify the trigger to be used.
|
|
- (above) Click the Tick icon Trigger Check properties window.
Giving the Trigger Event a Purpose
To test your trigger event you will need to add at least one rule to the Trigger Check.
The Message Popup Rule has to be indented so that it becomes a Child of the Trigger Check Rule.
This should indent the Message Popup rule one level in (below). |
|
The Message Popup Rule is now controlled by the Trigger Check Rule but it still has to be configured to show a message.
- With the Message Popup Rule highlighted, click the Edit button.
Again, click the Tick icon to exit the Message Popup Rule then exit the Session Editor.
Add a consist to your layout a short distance from the trigger (but further away than its radius), save the surveyor session, and then test in Driver Mode.
Another example of using the Trigger Check Rule can be found in the Message Popup Rule Applications link below.