How to Use Message Popup Rule (Applications)

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
(Trainz Wiki)
Line 126: Line 126:
 
<br>
 
<br>
 
='''Trainz Wiki'''=
 
='''Trainz Wiki'''=
 +
<table cellpadding="4" bgcolor=#ffffff>
 +
<tr valign="top">
 +
<td>[[file:TrainzWiki.png]]</td>
 +
<td>
 +
<font size="3">'''More Tutorials and Guides to Using Trainz'''</font><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>'''
 
*'''[[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 Merge Routes|Merging Routes]]'''
+
*'''[[How to Use Bulk Asset Update/Replace Tool|Using the Bulk Asset Update/Replace Tool]]'''
+
*'''[[How to Use Layers|Using Layers]]'''
+
</div>
+
<br>
+
<font size="3">'''Session Creation Tutorials:'''</font>
+
<div style="column-count:2;-moz-column-count:2;-webkit-column-count:2">
+
*'''[[How to Use Message Popup Rule|Adding Message Popups]]'''
+
*'''[[How to Use Navigation Point Rules|Adding Navigation Points]]'''
+
*'''[[How to Use Navigation Point Rules (Applications)|Adding Navigation Points - Applications]]'''
+
*'''[[How to Use Driver Setup Rule|Configuring the Driver Setup Rule]]'''
+
*'''[[How to Control Junctions in Sessions|Controlling Junctions in Sessions]]'''
+
*'''[[How to Control Signals in Sessions|Controlling Signals in Sessions]]'''
+
*'''[[How to Create a HTML Asset|Creating a HTML Asset (Session Introduction Page and In Game Messages)]]'''
+
*'''[[Parent Rule List|List of Parent Rules]]'''
+
*'''[[How to Use Parent and Child Rules|Parent and Child Rules]]'''
+
*'''[[How to Use Track Triggers|Using Track Triggers]]'''
+
*'''[[How to Use Variables in Sessions (Examples)|Using Variables in Sessions - Examples]]
+
</div>
+
  
 
[[Category:How-to guides]]
 
[[Category:How-to guides]]

Revision as of 17:01, 12 July 2018

Contents


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

Binoculars.PNG The Scenario:

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

Gears.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.


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:


Gears.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.




Trainz Wiki

TrainzWiki.png

More Tutorials and Guides to Using Trainz

Personal tools