How to Use Message Popup Rule (Applications)

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
m
m
(34 intermediate revisions by one user not shown)
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 cellpadding="4" bgcolor="Aquamarine">
 +
<tr valign="top">
 +
<td>[[file:LinkWiki.PNG|link=]]</td>
 +
<td>
 +
For information of how to configure the '''Message Popup Rule''' in '''Trainz''', see the '''Trainz Wiki Page''' at:-<br>
 +
* '''[[How to Use Message Popup Rule]]'''
 +
</td>
 +
</tr>
 +
</table>
 +
<br>
 +
__TOC__
 +
<br>
 +
 
<table cellpadding="4" bgcolor=#c1e7e7>
 
<table cellpadding="4" bgcolor=#c1e7e7>
 
<tr valign="top">
 
<tr valign="top">
<td>[[file:DotPoint.JPG]]</td>
+
<td>[[file:DotPoint.JPG|link=]]</td>
<td>The '''[[Session_Rule_List_with_Parameters#Message_Popup_Rule|Message Popup Rule]]''' is a '''T:ANE 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]]</td>
+
<td>[[file:DotPoint.JPG|link=]]</td>
<td>The '''[[Session_Rule_List_with_Parameters#Close_Message_Popup_Rule|Close Message Popup Rule]]''' is a '''T:ANE 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>
 
</tr>
 
</table>
 
</table>
----
+
<table> <!-- BEGIN Nav Buttons Table -->
 
+
<tr valign="top">
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.
+
<td width=729><span id="stepTimed"></span>&nbsp;</td>
 +
<td width=46>[[file:BackToTop.png|link=#top|alt=Top|Top]]</td>
 +
<td width=75>&nbsp;</td>
 +
<td width=75>[[file:NextDown.png|link=#stepNavPoint|alt=Next Down|Next Down]]</td>
 +
<td width=75>[[file:BackToBottom.png|link=#bottom|alt=Bottom|Bottom]]</td>
 +
</tr>
 +
</table> <!-- END Nav Buttons Table -->
  
 
='''Application 1: Timed Message'''=
 
='''Application 1: Timed Message'''=
  
==The Scenario==
+
<table cellpadding="4" bgcolor=#ffffff>
 
+
<tr valign="top">
 +
<td width="58">[[file:binoculars.PNG|link=]]</td>
 +
<td width="640"><span style="font-size: 17px;">'''The Scenario:'''</span><br>
 +
----</td>
 +
</tr>
 +
</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>
==Rules Used==
+
<table cellpadding="4" bgcolor=#ffffff>
 +
<tr valign="top">
 +
<td width="58">[[file:RulesWiki.PNG|link=]]</td>
 +
<td width="640"><span style="font-size: 17px;">'''Rules Used:'''</span><br>
 +
----</td>
 +
</tr>
 +
</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 25: Line 57:
 
*'''[[Session_Rule_List_with_Parameters#Wait_Rule|Wait Rule]]''' to wait a set time interval.
 
*'''[[Session_Rule_List_with_Parameters#Wait_Rule|Wait Rule]]''' to wait a set time interval.
 
*'''[[Session_Rule_List_with_Parameters#Close Message Popup Rule|Close Message Popup Rule]]''' to close the message window.
 
*'''[[Session_Rule_List_with_Parameters#Close Message Popup Rule|Close Message Popup Rule]]''' to close the message window.
 
+
<br>
==Session Rules Screenshot==
+
<table cellpadding="4" bgcolor=#ffffff>
 
+
<tr valign="top">
 +
<td width="58">[[file:screenshot.PNG|link=]]</td>
 +
<td width="640"><span style="font-size: 17px;">'''Session Editor Screenshot:'''</span><br>
 +
----</td>
 +
</tr>
 +
</table>
 
<table>
 
<table>
 
<tr>
 
<tr>
<td>[[file:Message_Popup.jpg]]</td>
+
<td>[[file:Message_Popup.jpg|link=]]</td>
 +
</tr>
 +
</table>
 +
<br>
 +
<table cellpadding="4" bgcolor=#ffffff>
 +
<tr valign="top">
 +
<td width="58">[[file:explanation.PNG|link=]]</td>
 +
<td width="640"><span style="font-size: 17px;">'''Description:'''</span><br>
 +
----</td>
 
</tr>
 
</tr>
 
</table>
 
</table>
 
==Explanation==
 
 
 
*'''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 41: Line 83:
 
***'''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 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 5: Close Message Popup''' The message window is closed.
<br>
+
<table width="100%">
 +
<table> <!-- BEGIN Nav Buttons Table -->
 +
<tr valign="top">
 +
<td width=729><span id="stepNavPoint"></span>&nbsp;</td>
 +
<td width=46>[[file:BackToTop.png|link=#top|alt=Top|Top]]</td>
 +
<td width=75>[[file:NextUp.png|link=#stepTimed|alt=Next Up|Top]]</td>
 +
<td width=75>[[file:NextDown.png|link=#bottom|alt=Next Down|Next Down]]</td>
 +
<td width=75>[[file:BackToBottom.png|link=#bottom|alt=Bottom|Bottom]]</td>
 +
</tr>
 +
</table> <!-- END Nav Buttons Table -->
 +
 
 
='''Application 2: Navigation Point and Train Stopped Event Message'''=
 
='''Application 2: Navigation Point and Train Stopped Event Message'''=
  
==The Scenario==
+
<table cellpadding="4" bgcolor=#ffffff>
 
+
<tr valign="top">
 +
<td width="58">[[file:binoculars.PNG|link=]]</td>
 +
<td width="640"><span style="font-size: 17px;">'''The Scenario:'''</span><br>
 +
----</td>
 +
</tr>
 +
</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>
==Preconditions==
+
<table cellpadding="4" bgcolor=#ffffff>
 
+
<tr valign="top">
 +
<td width="58">[[file:conditions.PNG|link=]]</td>
 +
<td width="640"><span style="font-size: 17px;">'''Preconditions:'''</span><br>
 +
----</td>
 +
</tr>
 +
</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>
==Rules Used==
+
<table cellpadding="4" bgcolor=#ffffff>
 
+
<tr valign="top">
 +
<td width="58">[[file:RulesWiki.PNG|link=]]</td>
 +
<td width="640"><span style="font-size: 17px;">'''Rules Used:'''</span><br>
 +
----</td>
 +
</tr>
 +
</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.
 
*'''[[Session_Rule_List_with_Parameters#Wait_on_Train_Stop/Start_Rule|Wait on Train Stop/Start Rule]]''' to trigger an event when the consist stops moving.
 
*'''[[Session_Rule_List_with_Parameters#Wait_on_Train_Stop/Start_Rule|Wait on Train Stop/Start Rule]]''' to trigger an event when the consist stops moving.
 
*'''[[Session_Rule_List_with_Parameters#Close Message Popup Rule|Close Message Popup Rule]]''' to close the message window.
 
*'''[[Session_Rule_List_with_Parameters#Close Message Popup Rule|Close Message Popup Rule]]''' to close the message window.
 
+
<br>
==Session Rules Screenshot==
+
<table cellpadding="4" bgcolor=#ffffff>
 
+
<tr valign="top">
 +
<td width="58">[[file:screenshot.PNG|link=]]</td>
 +
<td width="640"><span style="font-size: 17px;">'''Session Editor Screenshot:'''</span><br>
 +
----</td>
 +
</tr>
 +
</table>
 
<table>
 
<table>
 
<tr>
 
<tr>
<td>[[file:Message_Popup2.JPG]]</td>
+
<td>[[file:Message_Popup2.JPG|link=]]</td>
 +
</tr>
 +
</table>
 +
<br>
 +
<table cellpadding="4" bgcolor=#ffffff>
 +
<tr valign="top">
 +
<td width="58">[[file:explanation.PNG|link=]]</td>
 +
<td width="640"><span style="font-size: 17px;">'''Description:'''</span><br>
 +
----</td>
 
</tr>
 
</tr>
 
</table>
 
</table>
 
==Explanation==
 
 
 
*'''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.
Line 74: Line 151:
 
***'''Line 4: Close Message Popup''' The message window is closed.
 
***'''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.
+
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>
 +
 
 +
<table cellpadding="4" bgcolor="Aquamarine">
 +
<tr valign="top">
 +
<td>[[file:LinkWiki.PNG|link=]]</td>
 +
<td>
 +
Information of setting and using '''Navigation Points''' can be found on the '''Trainz Wiki Page''' at:-<br>
 +
* '''[[How to Use Navigation Point Rules]]'''
 +
</td>
 +
</tr>
 +
</table>
 +
<table> <!-- BEGIN Nav Buttons Table -->
 +
<tr valign="top">
 +
<td width=729><span id="bottom"></span>&nbsp;</td>
 +
<td width=46>[[file:BackToTop.png|link=#top|alt=Top|Top]]</td>
 +
<td width=75>[[file:NextUp.png|link=#stepNavPoint|alt=Next Up|Top]]</td>
 +
<td width=75>&nbsp;</td>
 +
<td width=75>&nbsp;</td>
 +
</tr>
 +
</table> <!-- END Nav Buttons Table -->
 
----
 
----
 
----
 
----
<br>
+
 
='''Trainz Wiki:'''=
+
='''Trainz Wiki'''=
 +
<table cellpadding="4" bgcolor=#ffffff>
 +
<tr valign="top">
 +
<td>[[file:TrainzWiki.png|link=]]</td>
 +
<td>
 +
<span style="font-size: 17px;">'''More Tutorials and Guides to Using Trainz'''</span><br>
 
*'''<span class="plainlinks">[http://online.ts2009.com/mediaWiki/index.php/HowTo How to Guides]</span>'''
 
*'''<span class="plainlinks">[http://online.ts2009.com/mediaWiki/index.php/HowTo How to Guides]</span>'''
 +
*'''[[Driver Commands List]]'''
 
*'''[[Session Rule List with Parameters|Session Rules List (Alphabetical) with Parameters]]'''
 
*'''[[Session Rule List with Parameters|Session Rules List (Alphabetical) with Parameters]]'''
 
*'''[[Session Rules By Categories With Properties|Session Rules List (Categories) With Parameters]]'''
 
*'''[[Session Rules By Categories With Properties|Session Rules List (Categories) With Parameters]]'''
<br>
+
</td>
<font size="3">'''Route Creation Tutorials:'''</font>
+
</tr>
<div style="column-count:2;-moz-column-count:2;-webkit-column-count:2">
+
</table>
*'''[[How to Use Bulk Asset Update/Replace Tool]]'''
+
----
*'''[[How to Use Layers]]'''
+
This page was created by Trainz user '''<span class="plainlinks">[http://online.ts2009.com/mediaWiki/index.php/User:Pware pware]</span>''' in April 2018 and was last updated as shown below.
</div>
+
----
<br>
+
[[Category:How-to guides]][[Category:Rules]]
<font size="3">'''Session Creation Tutorials:'''</font>
+
<div style="column-count:2;-moz-column-count:2;-webkit-column-count:2">
+
*'''[[How to Create a HTML Asset|How to Create a HTML Asset (Session Introduction Page and In Game Messages)]]'''
+
*'''[[How to Control Junctions in Sessions]]'''
+
*'''[[How to Control Signals in Sessions]]'''
+
*'''[[How to Use Message Popup Rule]]'''
+
*'''[[How to Use Navigation Point Rules]]'''
+
*'''[[How to Use Navigation Point Rules (Applications)]]'''
+
*'''[[How to Use Parent and Child Rules]]'''
+
*'''[[How to Use Track Triggers]]'''
+
*'''[[How to Use Variables in Sessions (Examples)]]'''
+
*'''[[Parent Rule List|List of Parent Rules]]'''
+
</div>
+
 
+
[[Category:How-to guides]]
+

Revision as of 19:55, 14 March 2022

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.

LinkWiki.PNG

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


Contents


DotPoint.JPG The WikiLink.PNG Message Popup Rule is a Trainz Session Rule that creates onscreen messages for users in Driver Mode.
DotPoint.JPG The WikiLink.PNG 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

Binoculars.PNG The Scenario:

A Message Popup is activated by a track trigger event and is automatically closed by a timed event.

RulesWiki.PNG Rules Used:


Screenshot.PNG Session Editor Screenshot:

Message Popup.jpg


Explanation.PNG 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.
  Top Next Up Next Down Bottom

Application 2: Navigation Point and Train Stopped Event Message

Binoculars.PNG The Scenario:

A Message Popup is activated by a navigation event and is automatically closed by a train stopped event.

Conditions.PNG Preconditions:


RulesWiki.PNG Rules Used:


Screenshot.PNG Session Editor Screenshot:

Message Popup2.JPG


Explanation.PNG 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.

LinkWiki.PNG

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

  Top Next Up    


Trainz Wiki

TrainzWiki.png

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.


Personal tools