How to Use Track Triggers

From TrainzOnline
(Redirected from Trigger Basics)
Jump to: navigation, search

The information in this Wiki Page applies to TANE, TRS19, Trainz Plus and TRS22.

          Next Down Bottom

Contents

BlueDot10x10.png Track Triggers are markers that are invisible in Driver but visible in Surveyor
BlueDot10x10.png They are used to activate some Session Rules and Driver Commands
BlueDot10x10.png They can be placed in a Route layer or in a Session layer


What are Track Triggers?

    Top   Next Down Bottom
Track triggers can be programmed to respond when a train (any train or a specific train) passes over them in Driver Mode. The response comes from executing a set of Session Rules that have been attached to a WikiLink.PNG Trigger Check Rule (or a similar rule) or a Driver Command that is monitoring the trigger.
Shown below left is a standard Trigger and below right is a Directional Trigger. They are just two examples of several types of track triggers. In both cases:-
DotPoint.JPG they are visible in Surveyor and invisible in Driver
DotPoint.JPG the "green wings" show their Effect Radius, the region where a consist will trigger an "event". The number in brackets show that radius in metres
RedDot10x10.png the Directional Trigger will normally only be triggered if the consist is moving in the direction indicated by the arrow
RedDot10x10.png the standard Trigger will be triggered regardless of the direction of movement
TrackTrigger.JPG
"Standard" Trigger
TrackDTrigger.png
Directional Trigger


Route or Session?

    Top Next Up Next Down Bottom
BlueDot10x10.png Triggers can be placed in a Route Layer or in a Session Layer


NotePad.PNG Notes:

DotPoint.JPG Placing Triggers in a Route layer (e.g. in the same layer as the track) means that they will be available in all Sessions created using that particular Route
DotPoint.JPG Placing Triggers in a Session layer means that they will only be available in that Session. This can be useful if two or more Sessions are being created and you want to use different triggers in each Session


LinkWiki.PNG Information on Route and Session layers can be found at:-


Adding a Trigger

Skip Down   Top Next Up Next Down Bottom
NotePad.PNG Notes:

A Trigger has two important properties:-

DotPoint.JPG its name which is needed for all commands and rules that use the Trigger, and
DotPoint.JPG its Effect Radius (the green "wings" shown in the image above with the radius value, in metres, shown below the trigger name). This controls how closely an AI train has to approach the trigger to activate it (smaller radius = closer to the trigger)
PencilTips.PNG A "standard" Trigger has no visible direction and, while it can be rotated, this has NO EFFECT on its operation. The Directional Trigger does have a direction because it is only triggered by trains travelling in a specific direction


In Surveyor Classic (S10)

Skip Down Skip Up        

Adding a Trigger (S10)

TrackTriggerMode.JPG
Steps: To add a Trigger:-
DotPoint1.JPG Open the Tracks Tool Flyout or press the  F4  key
DotPoint2.JPG Left Click on the Trackmark Mode button or press the  V  key
DotPoint3.JPG Left Click on the Trigger shown in the asset list
DotPoint4.JPG Left Click the  +  Add Object button - it may already be selected - or press the  A  key
DotPoint5.JPG Left Click on the track location where the Trigger is to be placed
This will place the Trigger on the track and open its properties window.


As soon as a new trigger has been placed, its properties window will open on the screen. It will initially be given a default name and assigned to the currently active layer.


Set the Trigger Name and Layer (S10)

TrackTriggerProperties.JPG
DotPoint1.JPG To change the trigger name Left Click on the name text entry box, delete the highlighted default name and enter a new name
DotPoint2.JPG To change its assigned layer Left Click on the layer text entry box (or use its scroll arrowheads) and select a new layer - see the Trainz Wiki Page WikiLink.PNG How to Use layers for more details on layers
DotPoint3.JPG To confirm the changes Left Click on the Tick.PNG icon or the  Save Changes  button (depending on your Trainz version) at the bottom of the window


Set the Effect Radius (S10)

At the bottom of the Track Tools flyout menu is an Advanced button. Left Click this button to open the advanced tools.

The Effect Radius sets the size of green "effect wings" attached both ends of the Trigger. This sets how close a consist has to approach to trigger its "event". The smaller the radius the closer it must approach.


TrackMarkRadiusTools.png
Steps: To set a Triggers Effect Radius:-
DotPoint1.JPG In the Track Tools flyout, Left Click on the Advanced button to open the Radius tools and properties. You will have a choice of 4 methods to set and adjust the Effect Radius
Options: Choose one of:-
Ablue.png To copy the Effect Radius of an existing Trigger
DotPoint2.JPG Left Click the Get Effect Radius icon
DotPoint3.JPG Left Click on the Trigger whose radius you want to copy - the radius will be copied into the Effect Radius Value text box (the default value is 20.00 metres)
DotPoint4.JPG To apply the new value see option Cblue.png below
Bblue.png To manually alter the Effect Radius value
DotPoint2.JPG Type the new value (in metres) into the Effect Radius Value text box
DotPoint3.JPG To apply the new value see option Cblue.png below
Cblue.png To apply a value in the Effect Radius Value text box (from methods Ablue.png, Bblue.png or Dblue.png) to another Trigger
DotPoint2.JPG Left Click the Copy Radius Value icon
DotPoint3.JPG Left Click on the Trigger that is to receive the new value (you can click on more than one)
Dblue.png To adjust the Effect Radius value up or down
DotPoint2.JPG Left Click the Adjust Effect Radius button
DotPoint3.JPG Select the Trigger
DotPoint4.JPG Left Click and Drag Forward (to increase the value) or Backward (to reduce the value)
DotPoint5.JPG The new value will be immediately applied to the selected Trigger as the mouse moves (but only one Trigger at a time)


PencilTips.PNG Once you have an Effect Radius entered in the value box, you can apply it to any number of Triggers by using method Cblue.png shown above


In Surveyor 2.0 (S20)

Skip Down Skip Up        


Surveyor 2.0 is only available in Trainz Plus and TRS22 Platinum


Adding a Trigger (S20)

DotPoint1.JPG In the Filter Palette either:-

Ablue.png Left Click on the Track Objects icon

FilterPaletteTrackObjectsSelected S20.png

OR
Bblue.png Left Click on the Content Drop Down Box

FilterPaletteNoIconSelected S20.png
Then select Track Objects
FilterSelectTrackObjects S20.png

PencilTips.PNG  Shortcut  If you already have a Trigger placed in your route then:-
DotPoint1Blue.png move the tool pointer over the existing trigger object and hold down the  Alt  key. The object name will appear in a ToolTip attached to the pointer
DotPoint2Blue.png while holding down the  Alt  key Left Click on the trigger to identify it in the Assets Palette and to select the Placement Tool. Release the key.
Jump to Step DotPoint5.JPG below.
NotePad.PNG Notes:

If the Filter Palette and the Assets Palette are not shown on the screen, then:-

Windows Menu
Steps: To display palettes:-
DotPoint1.JPG open the SurveyorWindowIcon.png Window Menu from the menu icons at the top of the screen
 
BulletTick.png visible palettes have ticks next to their names
BulletNoTick.png invisible (hidden) palettes have no ticks next to their names
DotPoint2.JPG if any required palette does not have a tick next to its name then Left Click on the name of the palette or on the empty BulletNoTick.png box next to its name. This will add a BulletTick.png and make the palette visible

There is a Trainz Wiki Page specifically covering the S20 Palettes at
WikiLink.PNG How to Use the Surveyor 2.0 Palettes


DotPoint2.JPG In the Assets Palette to narrow down the filter list, type "trigger" (UPPER/lower case does not matter) in the Search Text Box

FilterPaletteSearchTrigger S20.png
Both pallets shown docked


DotPoint3.JPG This will list all the Track Objects containing the text "trigger" in their names or descriptions.
DotPoint4.JPG Left Click on the item name Trigger (or another trigger object) in the list - you may have to scroll down the list to find the asset.

FilterPaletteSearchTriggerScrolled S20.png
If you are not sure about an asset then Double Left Click on the name to bring up its image and description.

NotePad.PNG When you select any asset in the Assets Palette list it will automatically select the Placement Tool so the next Left Click in your Trainz World will add that asset to your Trainz World

DotPoint5.JPG Place the Trigger on the track.

TriggerAdd S20.png
Steps: To add a Trigger:-
DotPoint1Blue.png If, for some reason, the Placement Tool has not been selected then Left Click on the Placement Tool or press the  E  key
DotPoint2Blue.png Left Click on the track at the position where you want to place the Trigger
Once placed a Trigger can be easily moved if needed.


NotePad.PNG Notes:

To delete a Trigger (or any asset):-

Steps:
DotPoint1.JPG select either the:-
Ablue.png Free Move Tool (or press  S ) OR
Bblue.png Fine Adjustment Tool (or press  D )
DotPoint2.JPG Left Click on the Trigger
DotPoint3.JPG press the  Delete  key


PencilTips.PNG If you need to rotate the Trigger to face the opposite direction then:-
Steps:
DotPoint1.JPG select the Trigger then Left Click on its Context Menu Icon (or press the  T  key)
DotPoint2.JPG from the popup menu select the  Rotate Trackside  option
Note: the direction it faces has no effect on its operation


Change Its Name (S20)

The name of the Trigger IS important. It is needed to identify the Trigger in Session Rules.

TriggerName S20.png
Steps: To change the name of a Trigger:-
DotPoint3Blue.png using either the Free Move Tool or the Fine Adjustment Tool select (Left Click on) the Trigger to be renamed
DotPoint4Blue.png in the Info Palette (you may need to make this palette visible - see the Notes: for Step  1  above) Left Click in the Name: entry box. Enter a name for the Trigger and press the  Enter  key

Set its Effect Radius (S20)

The Effect Radius sets the size of green "effect wings" attached both ends of the Trigger. This sets how close a consist has to approach to trigger its "event". The smaller the radius the closer it must approach.


TriggerRadius S20.png
Steps: To adjust the effect radius of a Trigger:-
DotPoint5Blue.png Left Click and Drag Forward or Backward on the Green Dot next to the Trigger to increase or reduce its Effect Radius
PencilTips.PNG For the best results when adjusting the Effect Radius of any track object, move your camera POV (point of view) to directly above the object

Move a Trigger Along the Track (S20)

Triggers can be moved along the track or to other tracks.

TriggerMove S20.png
Steps: To move the Trigger:-
DotPoint6Blue.png Left Click and Drag Forward or Backward on the Yellow Dot next to the Trigger to move it along the track or to another track

Move the Trigger Vertically (S20)

Triggers can be physically placed above (or below) the track. This feature allows them to be placed, for example, above the track so that they will not be hidden in Surveyor if a consist is parked on the Trigger.
TriggerFineAdjustVertical S20.png
Steps: To move a Trigger vertically:-
NotePad.PNG This option is only available with the Fine Adjustment Tool - the  D  key
DotPoint7Blue.png Left Click and Drag Forward or Backward on the  Blue  Vertical Axis Line above the Trigger to it up or down
PencilTips.PNG If you need to return the Trigger to its original position then:-
Steps: To correctly reattach the Trigger to the track:-
DotPoint1.JPG select the object and open (Left Click on) its Context Menu Icon (or press the  T  key)
DotPoint2.JPG from the popup menu select  Reattach to Track 

Move the Trigger Horizontally (S20)

Triggers can be physically placed left or right alongside the track. This feature allows them to be placed, for example, beside the track so that they will not be hidden in Surveyor if a consist is parked on the Trigger.
TriggerFineAdjustHorizontal S20.png
Steps: To move a Trigger horizontally:-
NotePad.PNG This option is only available with the Fine Adjustment Tool - the  D  key
DotPoint8Blue.png Left Click and Drag Forward or Backward on the  Red  Horizontal Axis Line attached to the Trigger to move it left or right
DotPoint9Blue.png Left Click and Drag Forward or Backward on the  Green  Horizontal Axis Line attached to the Trigger to move it forward or back
PencilTips.PNG If you need to return the Trigger to its original position then:-
Steps: To correctly reattach the Trigger to the track:-
DotPoint1.JPG select the object and open (Left Click on) its Context Menu Icon (or press the  T  key)
DotPoint2.JPG from the popup menu select  Reattach to Track 


NotePad.PNG Notes:

The  Green  Horizontal Axis Line shown as DotPoint9Blue.png in the image pointing forward from the Trigger will move it forward/backward regardless of whether it is on the track or not. It has the same effect as DotPoint6Blue.png Move a Trigger Along the Track. However, by using this tool it is possible to move the Trigger beyond the end of the track if that is ever required.

Assign a Trigger to a New Layer (S20)

The Info Palette will show the layer assigned to the currently selected object. To the left of the layer name is a small arrowhead object.
Info palette

Layer control
Steps: To assign a Trigger to a layer:-
In the Info Palette:-
DotPoint1.JPG Left Click the small arrowhead next to the layer name. This will open the layer properties for the selected object
DotPoint2.JPG Left Click the Layer drop down box to select a new layer for the object
DotPoint3.JPG if required, Left Click the Binding drop down box to select a new binding layer for the object. It cannot be bound to its own layer
DotPoint4.JPG if required, Left Click the  Lock Layer  button to lock the selected layer. If the layer is already locked then this will be shown as an  Unlock Layer  button


Stop.PNG WARNING:
DotPoint.JPG You will not be allowed to place a track object in a layer that is higher up the list than the layer containing the track
DotPoint.JPG Moving an object from one layer group to another (e.g. from the Route Layer Group to the Session Layer Group) will change where the object is saved (in the Route or in the Session)


LinkWiki.PNG Information on layers can be found at:-


Creating a Trigger Event

  Skip Up Top Next Up Next Down Bottom
When a consist enters the Effect Radius of a Trigger it will create an "event" that can be detected and responded to by some Session Rules and some Driver Commands. One such rule is the Trigger Check Rule which is added to a Session in the WikiLink.PNG Session Editor.
LinkWiki.PNG

More information on the Trigger Check Rule can be found on the Trainz Wiki Rules Page at:-


Steps:
DotPoint1.JPG Open the Session Editor:
To add the Trigger Check Rule to a session:-
DotPoint1Blue.png Open the Surveyor Main Menu in TANE (shown below left) or the Surveyor Edit Menu in TRS19 and later Trainz versions (shown below right)
DotPoint2Blue.png Select the option  Edit Session  from the drop down menu list
EditSessionMenu.JPG SessionEditMenuSP1.png
DotPoint2.JPG Add the Trigger Check Rule:
 
DotPoint3Blue.png In the Edit Session window (shown below left) Left Click on the  Add  button
DotPoint4Blue.png In the Rule Selection window (shown below right):-
BlueDot10x10.png Scroll down the list to select the Trigger Check rule, and
BlueDot10x10.png Left Click on the Tick.PNG icon
EditSessionWindowX.JPG RuleSelect.JPG

This will add the Trigger Check rule to the session.
DotPoint3.JPG Open the Trigger Check Rule Properties:
DotPoint5Blue.png With the Trigger Check rule highlighted (shown below) Left Click the  Edit  button. This will open the rule properties window
TriggerCheck.JPG
DotPoint4.JPG Configure the Rule:
For this example we will leave all settings unchanged and simply identify the Trigger to be used.
In the Trigger Properties window (shown below):-
DotPoint6Blue.png Left Click on the Add Trigger link
TriggerCheckProperties.JPG
LinkWiki.PNG

More information on the settings and options in this rule can be found on the Trainz Wiki Rules Page at:-

DotPoint5.JPG Select the Trigger:

The Trigger Selection Window will open and list all the Triggers in your Route.

DotPoint7Blue.png Select the Trigger you have just added
DotPoint8Blue.png Left Click on the Tick.PNG icon at the bottom of the selection window
TriggerList.JPG
DotPoint9Blue.png Once the Trigger has been added to the rule, Left Click on the Tick.PNG icon in the Trigger Check properties window to accept the change and close the Session Editor.


Adding an Instruction to the Trigger Event

Skip Down   Top Next Up Next Down Bottom

Adding a Child Rule

To test your trigger event you will need to add some Session Rules.

Steps:
DotPoint1.JPG Add A Message Popup Rule:
When you are back in the Session Editor window:-
DotPoint1Blue.png Make sure that the new Trigger Check Rule is selected (highlighted)
DotPoint2Blue.png Left Click the  Add  button to add another new rule
DotPoint3Blue.png Scroll down the rule selection window to find and select the Message Popup rule
TriggerAddMesPopup.JPG
DotPoint4Blue.png Left Click on the Tick.PNG icon
The Message Popup Rule should now appear directly below the Trigger Check rule. It will display a red cross because it has not yet been configured.
DotPoint2.JPG Indent the Popup Message Rule:
The Message Popup Rule has to be indented so that it becomes a Child of the Trigger Check Rule and is controlled by that rule.
SessionRuleIndent.JPG
DotPoint1Blue.png With the Message Popup Rule highlighted Left Click on the Indent (right arrow) button. This should indent the Message Popup rule one level inwards (as shown below).
SessionRuleIndented.JPG

The Message Popup Rule is now a Child Rule of the Trigger Check Rule and will only be executed after the Trigger has been activated by a train.


Configuring the Message and Testing

Skip Down Skip Up        
Steps:
DotPoint1.JPG Open the Message Popup Rule for Editing:
DotPoint1Blue.png With the Message Popup Rule highlighted and indented (as shown above) Left Click the  Edit  button. The Message Popup Rule properties window will appear (as shown below)

DotPoint2.JPG Configure the Message:
Set the properties as shown:-
DotPoint1Blue.png Check ON Close previous message popup windows
DotPoint2Blue.png Select Option Button Custom text
DotPoint3Blue.png Enter a short text message
MessagePopupText.JPG
DotPoint3.JPG (Optional) Add a Message Icon:
DotPoint1Blue.png Left Click the ; click here to set (shown left) and either:-
Ablue.png Scroll down the Texture Asset Selection List (shown below) to find a suitable icon, OR
Bblue.png Simply type "icon stop" in the text box to use one of the builtin icons
DotPoint2Blue.png Left Click on the Tick.PNG icon to select the icon
IconStop.JPG
DotPoint4.JPG Left Click on the Tick.PNG icon to exit the Message Popup Rule and return to the Session Editor
The completed Message Popup Rule
MessagePopupStop.JPG


LinkWiki.PNG

More information on this rule can be found on the Trainz Wiki Page at:-


DotPoint5.JPG Test the Trigger:
DotPoint1Blue.png Exit the Session Editor
DotPoint2Blue.png 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


Another example of using the Trigger Check Rule can be found in the Trainz Wiki Page WikiLink.PNG How to Use Message Popup Rule (Applications).

Alternatives to the Trigger Check Rule

  Skip Up Top Next Up   Bottom
RulesWiki.PNG There are other Session Rules that can be used in place of the Trigger Check Rule and Triggers. A few possibilities are listed below:-
DotPoint.JPG Directional Trigger Check Rule - identical to the Trigger Check Rule but adds the ability to test the train direction. Requires the use of a special Directional Trigger. For an example of its use see the Trainz Wiki Page WikiLink.PNG Controlling Signals in Sessions
DotPoint.JPG Trackside Check Rule - very similar to the Trigger Check Rule but provides some different options
DotPoint.JPG Navigation Points (see the How to Guides ; below) are more complex but provide more advanced controls and options
DotPoint.JPG Multiple Resource Check Rule - monitors and acts on changes in multiple industry or multiple wagon resource (commodity) levels
DotPoint.JPG Resource Verify Rule - monitors and acts on changes in a single industry or wagon resource (commodity) level
DotPoint.JPG Timecheck Rule - triggers an event at a set time.


CommandsWiki.png There is a driver command that can be used in place of the Trigger Check Rule:-
DotPoint.JPG Wait For Trigger - forces an AI controlled train to wait until a specified Trigger has been activated by another train
  Top Next Up    


Trainz Wiki

TrainzWiki.png

More Tutorials and Guides to Using Trainz

LinkWiki.PNG

Related Links


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


Personal tools