How to Use Message Popup Rule (Applications): Difference between revisions

From TrainzOnline
Jump to navigationJump to search
Pware (talk | contribs)
m fixed HTML tag errors
Pware (talk | contribs)
mNo edit summary
Line 1: Line 1:
The information in this Wiki Page applies to '''TANE''', '''TRS19''', '''Trainz Plus''' and '''TRS22'''. It gives practical examples of how to use the '''Message Popup Rule''' in Sessions to create messages that appear after an event and automatically close after another event.
<table width=1000>
<tr valign="top">
<td>
The information in this Wiki Page applies to '''TANE''', '''TRS19''', '''Trainz Plus''' and '''TRS22'''. It gives practical examples of how to use the '''Message Popup Rule''' in Sessions to create messages that appear after an event and automatically close after another event.</td>
</tr>
</table>


<table>
<table width=1000>
<tr valign="top">
<tr valign="top">
<td>
<td>
__TOC__
__TOC__
</td>
</td>
<td width=700>
<td>
<table cellpadding=4 bgcolor="Aquamarine">
<table cellpadding=4 bgcolor="Aquamarine">
<tr valign="top">
<tr valign="top">
Line 20: Line 25:
</table>
</table>
<br>
<br>
<table cellpadding=4 bgcolor=#c1e7e7>
<table bgcolor=#000000 cellpadding=2>
<tr valign="top">
<td>
<table bgcolor=#ffffb0 cellpadding=2>
<tr valign="top">
<td width=25>[[image:NotePad.PNG|link=]]</td>
<td><span style="font-size: 17px;">'''Notes:'''</span><br>
----
</td>
</tr>
<tr valign="top">
<tr valign="top">
<td>[[file:DotPoint.JPG|link=]]</td>
<td>[[image:DotPoint.JPG|10px|link=]]</td>
<td>The [[file:WikiLink.PNG|link=]] '''[[Session_Rule_List_with_Parameters#Message_Popup_Rule|Message Popup Rule]]''' is a '''Trainz Session Rule''' that creates onscreen messages for users in '''Driver Mode'''.</td>
<td>The [[file:WikiLink.PNG|link=]] '''[[Session_Rule_List_with_Parameters#Message_Popup_Rule|Message Popup Rule]]''' is a '''Trainz Session Rule''' that creates onscreen messages for users in '''Driver Mode'''</td>
</tr>
</tr>
<tr valign="top">
<tr valign="top">
<td>[[file:DotPoint.JPG|link=]]</td>
<td>[[image:DotPoint.JPG|10px|link=]]</td>
<td>The [[file:WikiLink.PNG|link=]] '''[[Session_Rule_List_with_Parameters#Close_Message_Popup_Rule|Close Message Popup Rule]]''' is a '''Trainz Session Rule''' that closes onscreen messages for users in '''Driver Mode'''.</td>
<td>The [[file:WikiLink.PNG|link=]] '''[[Session_Rule_List_with_Parameters#Close_Message_Popup_Rule|Close Message Popup Rule]]''' is a '''Trainz Session Rule''' that closes onscreen messages for users in '''Driver Mode'''</td>
</tr>
</table>
</td>
</tr>
</tr>
</table>
</table>
<br>
<table width=1000> <!-- BEGIN Nav Buttons Table -->
<table width=1000> <!-- BEGIN Nav Buttons Table -->
<tr valign="top">
<tr valign="top">
Line 84: Line 102:
</tr>
</tr>
</table>
</table>
<table width=1000>
<table width=1000>
<tr valign="top">
<tr valign="top">
<td>
<td>[[image:DotPoint.JPG|10px|link=]]</td>
*'''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.
<td>'''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).
<table>
***'''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.
<tr valign="top">
***'''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.
<td>[[image:DotPoint.JPG|10px|link=]]</td>
****'''Line 5: Close Message Popup''' The message window is closed.
<td>'''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).
<table>
<tr valign="top">
<td>[[image:DotPoint.JPG|10px|link=]]</td>
<td>'''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</td>
</tr>
<tr valign="top">
<td>[[image:DotPoint.JPG|10px|link=]]</td>
<td>'''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.
<table>
<tr valign="top">
<td>[[image:DotPoint.JPG|10px|link=]]</td>
<td>'''Line 5: Close Message Popup''' The message window is closed</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</td>
</tr>
</tr>
</table>
</table>
 
<br>
<table width=1000> <!-- BEGIN Nav Buttons Table -->
<table width=1000> <!-- BEGIN Nav Buttons Table -->
<tr valign="top">
<tr valign="top">
Line 124: Line 163:
</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>
Line 158: Line 197:
</tr>
</tr>
</table>
</table>
<table width=1000>
<table width=1000>
<tr valign="top">
<tr valign="top">
<td>
<td>[[image:DotPoint.JPG|10px|link=]]</td>
*'''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.
<td>'''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.
<table>
**'''Line 3: Wait on Train Stop/Start''' When the consist comes to a stop then it will execute its own set of child rules.
<tr valign="top">
***'''Line 4: Close Message Popup''' The message window is closed.
<td>[[image:DotPoint.JPG|10px|link=]]</td>
 
<td>'''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</td>
</tr>
<tr valign="top">
<td>[[image:DotPoint.JPG|10px|link=]]</td>
<td>'''Line 3: Wait on Train Stop/Start''' When the consist comes to a stop then it will execute its own set of child rules
<table>
<tr valign="top">
<td>[[image:DotPoint.JPG|10px|link=]]</td>
<td>'''Line 4: Close Message Popup''' The message window is closed.
</td>
</tr>
</table>
</td>
</tr>
</table>
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.<br>
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.<br>
</td>
</td>

Revision as of 00:07, 20 September 2023

The information in this Wiki Page applies to TANE, TRS19, Trainz Plus and TRS22. It gives practical examples of how to use the Message Popup Rule in Sessions to create messages that appear after an event and automatically close after another event.

For information of how to configure the Message Popup Rule in Trainz, see the Trainz Wiki Page at:-


Notes:

Error creating thumbnail: /bin/bash: line 1: /usr/bin/convert: No such file or directory Error code: 127 The Message Popup Rule is a Trainz Session Rule that creates onscreen messages for users in Driver Mode
Error creating thumbnail: /bin/bash: line 1: /usr/bin/convert: No such file or directory Error code: 127 The Close Message Popup Rule is a Trainz Session Rule that closes onscreen messages for users in Driver Mode


  Top   Next Down Bottom

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:


Session Editor Screenshot:


Description:

Error creating thumbnail: /bin/bash: line 1: /usr/bin/convert: No such file or directory Error code: 127 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.
Error creating thumbnail: /bin/bash: line 1: /usr/bin/convert: No such file or directory Error code: 127 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).
Error creating thumbnail: /bin/bash: line 1: /usr/bin/convert: No such file or directory Error code: 127 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
Error creating thumbnail: /bin/bash: line 1: /usr/bin/convert: No such file or directory Error code: 127 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.
Error creating thumbnail: /bin/bash: line 1: /usr/bin/convert: No such file or directory Error code: 127 Line 5: Close Message Popup The message window is closed


  Top Next Up Next Down Bottom

Application 2: Navigation Point and Train Stopped Event Message

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:


Session Editor Screenshot:


Description:

Error creating thumbnail: /bin/bash: line 1: /usr/bin/convert: No such file or directory Error code: 127 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
Error creating thumbnail: /bin/bash: line 1: /usr/bin/convert: No such file or directory Error code: 127 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
Error creating thumbnail: /bin/bash: line 1: /usr/bin/convert: No such file or directory Error code: 127 Line 3: Wait on Train Stop/Start When the consist comes to a stop then it will execute its own set of child rules
Error creating thumbnail: /bin/bash: line 1: /usr/bin/convert: No such file or directory Error code: 127 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.

Information of setting and using Navigation Points can be found on the Trainz Wiki Page at:-

  Top Next Up    


Trainz Wiki

More Tutorials and Guides to Using Trainz


This page was created by Trainz user pware in April 2018 and was last updated as shown below.