How to Use Message Popup Rule (Applications)
From TrainzOnline
(Difference between revisions)
Line 18: | Line 18: | ||
<table cellpadding="4" bgcolor=#ffffff> | <table cellpadding="4" bgcolor=#ffffff> | ||
<tr valign="top"> | <tr valign="top"> | ||
− | <td>[[file:binoculars.PNG]]</td> | + | <td width="58">[[file:binoculars.PNG]]</td> |
− | <td><font size="3">'''The Scenario:'''</font></td> | + | <td width="640"><font size="3">'''The Scenario:'''</font><br> |
+ | ----</td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
− | |||
A '''Message Popup''' is activated by a track trigger event and is automatically closed by a timed event. | A '''Message Popup''' is activated by a track trigger event and is automatically closed by a timed event. | ||
<br><br> | <br><br> | ||
<table cellpadding="4" bgcolor=#ffffff> | <table cellpadding="4" bgcolor=#ffffff> | ||
<tr valign="top"> | <tr valign="top"> | ||
− | <td>[[file:Gears.PNG]]</td> | + | <td width="58">[[file:Gears.PNG]]</td> |
− | <td><font size="3">'''Rules Used:'''</font></td> | + | <td width="640"><font size="3">'''Rules Used:'''</font><br> |
+ | ----</td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
− | |||
*'''[[Session_Rule_List_with_Parameters#Trigger_Check_Rule|Trigger Check Rule]]''' to trigger the message event. | *'''[[Session_Rule_List_with_Parameters#Trigger_Check_Rule|Trigger Check Rule]]''' to trigger the message event. | ||
*'''[[Session_Rule_List_with_Parameters#Simultaneous_List_Rule|Simultaneous List Rule]]''' to force all child rules to be executed at the same time. | *'''[[Session_Rule_List_with_Parameters#Simultaneous_List_Rule|Simultaneous List Rule]]''' to force all child rules to be executed at the same time. | ||
Line 40: | Line 40: | ||
<table cellpadding="4" bgcolor=#ffffff> | <table cellpadding="4" bgcolor=#ffffff> | ||
<tr valign="top"> | <tr valign="top"> | ||
− | <td>[[file:screenshot.PNG]]</td> | + | <td width="58">[[file:screenshot.PNG]]</td> |
− | <td><font size="3">'''Session Editor Screenshot:'''</font></td> | + | <td width="640"><font size="3">'''Session Editor Screenshot:'''</font><br> |
+ | ----</td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
− | |||
<table> | <table> | ||
<tr> | <tr> | ||
Line 53: | Line 53: | ||
<table cellpadding="4" bgcolor=#ffffff> | <table cellpadding="4" bgcolor=#ffffff> | ||
<tr valign="top"> | <tr valign="top"> | ||
− | <td>[[file:explanation.PNG]]</td> | + | <td width="58">[[file:explanation.PNG]]</td> |
− | <td><font size="3">'''Description:'''</font></td> | + | <td width="640"><font size="3">'''Description:'''</font><br> |
+ | ----</td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
− | |||
*'''Line 1: Trigger Check''' The event is triggered when a consist passes over a track trigger but any event could be used, such as a '''Navigation Point''', a '''TimeCheck''', a '''Wait On ...''' or '''Wait For ...''', etc. As long as the following rules are child rules of the trigger event. | *'''Line 1: Trigger Check''' The event is triggered when a consist passes over a track trigger but any event could be used, such as a '''Navigation Point''', a '''TimeCheck''', a '''Wait On ...''' or '''Wait For ...''', etc. As long as the following rules are child rules of the trigger event. | ||
**'''Line 2: Simultaneous List''' This forces all the following child rules to be executed at the same time. Events such as the '''Trigger Check''' that execute their child rules in order would not work in this example because everything else would be forced to wait until the '''Message Popup''' has been closed. Using the '''Simultaneous List Rule''' avoids this problem. Events that execute their child rules simultaneously would not need the '''Simultaneous List Rule''' (see next example). | **'''Line 2: Simultaneous List''' This forces all the following child rules to be executed at the same time. Events such as the '''Trigger Check''' that execute their child rules in order would not work in this example because everything else would be forced to wait until the '''Message Popup''' has been closed. Using the '''Simultaneous List Rule''' avoids this problem. Events that execute their child rules simultaneously would not need the '''Simultaneous List Rule''' (see next example). | ||
Line 68: | Line 68: | ||
<table cellpadding="4" bgcolor=#ffffff> | <table cellpadding="4" bgcolor=#ffffff> | ||
<tr valign="top"> | <tr valign="top"> | ||
− | <td>[[file:binoculars.PNG]]</td> | + | <td width="58">[[file:binoculars.PNG]]</td> |
− | <td><font size="3">'''The Scenario:'''</font></td> | + | <td width="640"><font size="3">'''The Scenario:'''</font><br> |
+ | ----</td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
− | |||
A '''Message Popup''' is activated by a navigation event and is automatically closed by a train stopped event. | A '''Message Popup''' is activated by a navigation event and is automatically closed by a train stopped event. | ||
<br><br> | <br><br> | ||
<table cellpadding="4" bgcolor=#ffffff> | <table cellpadding="4" bgcolor=#ffffff> | ||
<tr valign="top"> | <tr valign="top"> | ||
− | <td>[[file:conditions.PNG]]</td> | + | <td width="58">[[file:conditions.PNG]]</td> |
− | <td><font size="3">'''Preconditions:'''</font></td> | + | <td width="640"><font size="3">'''Preconditions:'''</font><br> |
+ | ----</td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
− | |||
*'''The [[Session_Rule_List_with_Parameters#Navigation_Display_Rule|Navigation Display Rule]]''' is used to create the navigation point set. | *'''The [[Session_Rule_List_with_Parameters#Navigation_Display_Rule|Navigation Display Rule]]''' is used to create the navigation point set. | ||
<br> | <br> | ||
<table cellpadding="4" bgcolor=#ffffff> | <table cellpadding="4" bgcolor=#ffffff> | ||
<tr valign="top"> | <tr valign="top"> | ||
− | <td>[[file:Gears.PNG]]</td> | + | <td width="58">[[file:Gears.PNG]]</td> |
− | <td><font size="3">'''Rules Used:'''</font></td> | + | <td width="640"><font size="3">'''Rules Used:'''</font><br> |
+ | ----</td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
− | |||
*'''[[Session_Rule_List_with_Parameters#Wait_on_Navigation_Point_Rule|Wait on Navigation Point Rule]]''' to trigger the message event. | *'''[[Session_Rule_List_with_Parameters#Wait_on_Navigation_Point_Rule|Wait on Navigation Point Rule]]''' to trigger the message event. | ||
*'''[[Session_Rule_List_with_Parameters#Message_Popup_Rule|Message Popup Rule]]''' to open a message window on the screen. | *'''[[Session_Rule_List_with_Parameters#Message_Popup_Rule|Message Popup Rule]]''' to open a message window on the screen. | ||
Line 98: | Line 98: | ||
<table cellpadding="4" bgcolor=#ffffff> | <table cellpadding="4" bgcolor=#ffffff> | ||
<tr valign="top"> | <tr valign="top"> | ||
− | <td>[[file:screenshot.PNG]]</td> | + | <td width="58">[[file:screenshot.PNG]]</td> |
− | <td><font size="3">'''Session Editor Screenshot:'''</font></td> | + | <td width="640"><font size="3">'''Session Editor Screenshot:'''</font><br> |
+ | ----</td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
− | |||
<table> | <table> | ||
<tr> | <tr> | ||
Line 111: | Line 111: | ||
<table cellpadding="4" bgcolor=#ffffff> | <table cellpadding="4" bgcolor=#ffffff> | ||
<tr valign="top"> | <tr valign="top"> | ||
− | <td>[[file:explanation.PNG]]</td> | + | <td width="58">[[file:explanation.PNG]]</td> |
− | <td><font size="3">'''Description:'''</font></td> | + | <td width="640"><font size="3">'''Description:'''</font><br> |
+ | ----</td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
− | |||
*'''Line 1: Wait on Navigation Point''' The event is triggered when a consist reaches a preset navigation point. This rule executes all its child rules simultaneously so no '''Simultaneous List Rule''' is required in this example. | *'''Line 1: Wait on Navigation Point''' The event is triggered when a consist reaches a preset navigation point. This rule executes all its child rules simultaneously so no '''Simultaneous List Rule''' is required in this example. | ||
**'''Line 2: Message Popup''' This places the message window on the screen and waits for it to be closed either manually (by the user) or by another rule. | **'''Line 2: Message Popup''' This places the message window on the screen and waits for it to be closed either manually (by the user) or by another rule. |
Revision as of 09:17, 12 July 2018
Contents |
The Message Popup Rule is a T:ANE Session Rule that creates onscreen messages for users in Driver Mode. | |
The Close Message Popup Rule is a T:ANE Session Rule that closes onscreen messages for users in Driver Mode. |
This page gives practical examples of how these rules can be used in a session to create messages that appear after an event and automatically close after another event.
Application 1: Timed Message
The Scenario: |
A Message Popup is activated by a track trigger event and is automatically closed by a timed event.
Rules Used: |
- Trigger Check Rule to trigger the message event.
- Simultaneous List Rule to force all child rules to be executed at the same time.
- Message Popup Rule to open a message window on the screen.
- Wait Rule to wait a set time interval.
- Close Message Popup Rule to close the message window.
Session Editor Screenshot: |
Description: |
- Line 1: Trigger Check The event is triggered when a consist passes over a track trigger but any event could be used, such as a Navigation Point, a TimeCheck, a Wait On ... or Wait For ..., etc. As long as the following rules are child rules of the trigger event.
- Line 2: Simultaneous List This forces all the following child rules to be executed at the same time. Events such as the Trigger Check that execute their child rules in order would not work in this example because everything else would be forced to wait until the Message Popup has been closed. Using the Simultaneous List Rule avoids this problem. Events that execute their child rules simultaneously would not need the Simultaneous List Rule (see next example).
- Line 3: Message Popup This places the message window on the screen and waits for it to be closed either manually (by the user) or by another rule.
- Line 4: Wait This forces a wait for a set time period, in this case 20 seconds but any time interval can be set. At the end of that period the Wait Rule will execute its own set of child rules.
- Line 5: Close Message Popup The message window is closed.
- Line 2: Simultaneous List This forces all the following child rules to be executed at the same time. Events such as the Trigger Check that execute their child rules in order would not work in this example because everything else would be forced to wait until the Message Popup has been closed. Using the Simultaneous List Rule avoids this problem. Events that execute their child rules simultaneously would not need the Simultaneous List Rule (see next example).
The Scenario: |
A Message Popup is activated by a navigation event and is automatically closed by a train stopped event.
Preconditions: |
- The Navigation Display Rule is used to create the navigation point set.
Rules Used: |
- Wait on Navigation Point Rule to trigger the message event.
- Message Popup Rule to open a message window on the screen.
- Wait on Train Stop/Start Rule to trigger an event when the consist stops moving.
- Close Message Popup Rule to close the message window.
Session Editor Screenshot: |
Description: |
- Line 1: Wait on Navigation Point The event is triggered when a consist reaches a preset navigation point. This rule executes all its child rules simultaneously so no Simultaneous List Rule is required in this example.
- Line 2: Message Popup This places the message window on the screen and waits for it to be closed either manually (by the user) or by another rule.
- Line 3: Wait on Train Stop/Start When the consist comes to a stop then it will execute its own set of child rules.
- Line 4: Close Message Popup The message window is closed.
In this example, the Close Message Popups Rule could be replaced by lines 2, 3, 4 and 5 from the Timed Message example shown above to produce a new message when the train stops moving and that message would be closed after a set time interval.
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 Navigation Points
- Adding Navigation Points - Applications
- Configuring the Driver Setup Rule
- Controlling Junctions in Sessions
- 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