Events & Triggers
The Events & Triggers Editor is one of the most powerful functions inside of BushTripInjector. Define a set of Triggers and fire Actions for the User.
Triggers
Triggers initiate actions. There are different types of triggers. When they are active, they will fire whenever the appropriate conditions are met. When a trigger is deactivated it is not evaluating its conditions to decide whether it should fire its actions.
Following Triggers are available in BushTripInjector:
General Trigger Properties
All triggers include the following properties (except where noted in the descriptions below).
Property | Description |
id | Reserved. Do not edit this field. |
Descr | The name of the trigger (Sim internal). The system will generate a name such as AirportLandingTrigger1, simply be appending the number of the next trigger to the type of trigger. This name cannot be edited inside of BushTripInjector. In a future Version, BTI will generate this field by the Name of the Trigger. Make sure though that the name is unique. |
Name | The name of the trigger (User friendly). This name can be edited inside of BushTripInjector. Make sure though that the name is unique. |
InstanceId | This is the GUID generated to ensure the object has a unique reference. Not visible in BushTripInjector (but used for the sim) |
Activated | Set to True or False. This value can be changed during the mission with the ObjectActivationAction. |
DefaultActivated | Set to True or False. This value will be used as “Activated” when re-spawning a bushtrip. |
Latched | This will be False at the start of a mission and set to True when the trigger fires. Not visible in BushTripInjector (but used for the sim) |
OneShot | Set to True if the trigger should only fire once during the mission. Note a few triggers do not contain this property, these are noted in the descriptions for those triggers. |
Automatic Activation | Tick this checkbox if you want BushTripInjector to handle the activation automatically. The trigger will be activated only for the legs of autodetect or our manual entered leg numbers. |
(detected) | BushTripInjector calculates on your flightplan, when it is the best choice to activate your trigger. |
Leg Numbers | If you are not happy with BTI’s detection, enter here the leg numbers in a comma separated list where your trigger should be activated. |
AirportLandingTrigger
An airport landing trigger is fired when the user’s aircraft lands on a runway.
Following properties can be set in addition to the GeneralTrigger Properties:
AirportIdent | The airport identification code, such as KSEA for SeaTac International. |
RunwayFilter | A Runway to filter for this trigger. If not set, all runways are fire this trigger. |
LandingType | One of: FullStop, TouchDown or Any. The default is Any. |
AreaLandingTrigger
An area landing trigger is fired when the user’s aircraft lands on one in a specified list of areas
Add your Areas you want to have been watched by this trigger.
CounterTrigger
A counter trigger will fire when it is counter reaches a specified limit. The counter is incremented by CountActions.
StartCount | Integer indicating the count to start at. |
StopCount | Integer indicating when the count stops and the trigger fires. |
Counter | The current value of the counter (not visible in BushTripInjector) |
PropertyTrigger
A property trigger fires when one or more conditions are met. These conditions can be based on aircraft speed, altitude, failure of components, or a whole host of other simulation variables.
Condition | One or more conditions, created using the Conditional Editor, which can be a list of logical AND, or a list of logical OR, conditions. |
ProximityTrigger
A proximity trigger is fired when the specified object, usually the users aircraft, enters a given box.
Areas | List of one or more 3D box areas that the trigger applies to. |
EnterActions | List of actions to be triggered when a specified object enters the box |
ExitActions | List of actions to be triggered when a specified object leaves the box |
TimerTrigger
A timer trigger fires when the given number of seconds has elapsed.
StartTime | The time, in seconds, when the timer is to start. |
StopTime | The time, in seconds, when the timer is to stop, and fire any actions linked to the trigger. |
OnScreenTimer | Set to True if an onscreen timer is to be rendered. Note that there can only be one onscreen timer (so if a new one is opened, it will replace any existing one). The default is False. NOT WORKING WITH MSFS |
StaysVisible | Set to True if the timer is to stay visible after the StopTime has been reached, typically so that a player can view their mission time. The default is True. NOT WORKING WITH MSFS |
IsGlobal | Set to True to specify the actions of the trigger firing apply to all players, False to specifiy they only apply to the triggering player. |
CanBeUpdatedDuringLoading | Time can be updated during loading |
Actions
Define the Actions fired, when a trigger is happen. Following Actions are available in BushTripInjector:
General Action Properties
All actions include the following properties:
Descr | The name of the action. The system will generate a name such as DialogAction1, simply be appending the number of the next action to the type of action. This name cannot be edited inside of BushTripInjector. In a future Version, BTI will generate this field by the Name of the Trigger. Make sure though that the name is unique.. |
Immediate | If true, the action will not be queued and will be executed immediately. Undefined means that the MSFS default behavior is used (currently true). |
AdjustPayLoadAction
An adjust payload action is used to set, or add to, the weight on a payload station
StationIndex | The index number of the station. |
AdjustmentType | One of: Set or Add. |
Weight | The quantity of the adjustment. |
ChangeAssistanceItemAction
A change assistance item action is use to change to settings inside of a trip.
Setting | The setting to be changed |
Changeable | One of: None, Lock or Unlock. |
Value | The value to set. |
CountAction
A count action will add the value of the Count property to the Counter value in the given list of triggers (which should all be CounterTriggers). Counter triggers will fire when a certain specified count is reached.
Count | Value to be added to the Counter triggers current counter. The default is 1. |
Triggers | List of Counter triggers to have their counts incremented. The left list are all available Counter triggers, the right list the already selected. |
CustomAction
A custom action is used to enable communications between a mission and a SimConnect client application.
Payload | Text that will be transmitted to the SimConnect client when the action is initiated. The text can be any string that the client might find useful. |
WaitForCompletion | Set this to True if a completion message must be received from the SimConnect client, before the mission progresses. Set to False otherwise. |
ExecuteListAction
With the ExecuteListAction you can bundle multiple action to one action and reference it in one or more triggers.
Use it, when you fire multiple actions on more than one trigger. Adding or removing Actions to/from the ExecuteListAction effects all referencing triggers.
Actions | An list of actions, which are executed when this action is executed |
ExecuteRPNAction
The ExcuteRPNAction allows you to run complex RPN (Reverse Polish Notation) code and assign the results to variables inside the sim. A use-case is i.e. turn off the autopilot every time when the user is activating it to simulate a autopilot failure.
RPNCode | The RPN (Reverse Polish Notation) code to be executed. |
Reverse Polish notation (RPN) or simply postfix notation, is a mathematical notation in which operators follow their operands, It does not need any parentheses as long as each operator has a fixed number of operands. Here a some examples:
Normal Notation | Revers Polish Notation |
---|---|
2 + 3 | 2 3 + |
2 + 3 * 4 | 2 3 4 * + |
2 * 3 + 4 | 2 3 * 4 + |
(2 + 3) * 4 | 2 3 + 4 * |
You can set each settable variable of any type of vars the simulator supports. For variable-types have a look into the official documentation: MSFS SDK Dokumentation Variable Types.
A overview for SimVars (A: Vars) is available here: MSFS SDK Dokumentation SimVars.
The K:-Events documentation is here: MSFS SDK Key Event IDs.
Variables must be enclosed in parentheses, preceded by the variable type separated by a colon, and if units are mandatory, they must be added comma separated.
To write a variable instead of reading it, a greater-than sign must be prefixed. Examples:
(A:GROUND ALTITUDE, Feet) 5000 < | Is the A-Var “GROUND ALTITUDE” in feet less than 5000 |
1 (>A:LIGHT LANDING, Bool) | Set A-Var “LIGHT LANDING” to true (turn on landing lights) |
(>K:TOGGLE_ICS) | Calling the Key Event “TOGGLE_ICS” |
(L:MyLocalVar) 3 == if { 1 } els { 0 } | Is the LocalVar “MyLocalVar” set to 3? The first statement is the better one, if MyLocalVar is not defined. |
FailureAction
A failure action is used to change the behavior of one of the aircraft’s systems. It is possible also to change a failing system’s status back to fully functional, by changing its HealthPercent value to 100. Failures only apply to the user aircraft.
System | One of: Engine, EngineFire, Coolant, OilSystem, OilLeak, VacuumSystem, Pitot, Static, ElectricalSystem, Generator, FuelPump, FuelLeak, APU, APUFire, TurbineIgnition, HydraulicPump, HydraulicLeak, LeftMagneto, RightMagneto, Elevator, LeftAileron, RightAileron, Rudder, RearTail, LeftFlap, RightFlap, LeftWing, LeftWingTip, RightWing, RightWingTip, CenterGear, RightGear, LeftGear, AuxGear, LeftBrake, RightBrake, BrakeSystemHydraulicSource, AltitudeIndicator, AirspeedIndicator, Altimeter, DirectionalGyro, Compass, TurnCoordinator, VSI, ComRadios, NavRadios, ADFRadios, or Transponder. |
SystemIndex | If an aircraft has multiple systems (usually applies to engines), enter the index of the system that the failure should apply to. |
Behavior | One of: Failed, Failing, Burn or Leak. |
HealthPercent | Enter a value of between 0 (complete failure) and 100 (fully functional). |
TargetPlayer | The players who should experience the failure. One of: Local Player, All Players, Triggering Player, All but Triggering Player. Future use, currently not implemented in BTI. |
Not all failures will work with any plane. Checkout by yourself!
FadeToColorAction
RGB | The Red / Green / Blue Values for the color you want to fade. |
Fade Duration | Duration of the fade in seconds. |
Fade to Color | TRUE to fade to color. FALSE to fade from color. |
FlowEventAction
FlowEventActions are currently only for internal features like Refueling and text-to-speech at end of a leg.
FocusInstrumentAction
Focus an instrument of the current aircraft.
Partid | PartId in then panel configuration of a cockpit instrument |
HtmlID | Id of a cockpit html instrument, if the panel is a Html-Panel |
FocusDuration | Focus duration in seconds |
Highlight | If checked, the part is highlighted. |
Set Camera | If checked, camera is set to highlight the instrument. |
ForceMusicAction
Forces to play a music file without considering the current RTC and RTPC status. See also PlayMusicAction and StopMusicAction
MusicSelection | Name of the Wwise music file. The Wwise music file must be located in the Additional Files folder in a subfolder named “wwise”. The file name is .PC.PCK. Example: If the MusicSelection is defined as “DISCOVERY_CARIBBEAN”, the file name must be DISCOVERY_CARIBBEAN.PC.PCK. The Wwise file must be defined with special properties that correspond to the MusicSelection name. |
InstructorDialogAction
A instructor dialog action is used to add speech to be rendered over the audio system, and/or text to be displayed on the screen.
Text | The text to appear on the screen. |
Delay | A delay in seconds after the text and audio are rendered. |
Speaker | The speaker, who is telling. Possible values are:Default ATC –> deactivated, CTD in-gameATC LEGACY –> deactivated, CTD in-gamePILOT COPILOT DEFAULT NARRATOR GWPS –> deactivated, CTD in-gameSCREEN READER –> deactivated, CTD in-game |
Speaker Name | Display text of the speaker’s name in the subtitles. If empty, Speaker is used. |
EndActions | An optional list of actions, which are executed after this action has been executed. |
MissionFailureAction
A mission failure action is used to fail and the end the mission immediately.
Text | The text to appear on the screen. |
ObjectActivationAction
The object activation action will change the state of most different types of object, Triggers, AI objects, Scenery objects and some Mission objects.
NewObjectState | Set to True or False. |
ObjectReferenceList | List of objects (AI Object, Scenery, Mission Objects and Triggers) to have their status changed. In the left list you will find all available objects for this action, in the right one, the already selected. |
OneShotSoundAction
The one shot sound action will render a single wave file. Use this for sound effects rather than dialog (use the TextToSpeech (DialogAction) for speech audio).
PauseSim
With the PauseSimAction you can pause and unpause the simulator. The best usage is a Pause and an Unpause action referenced from one trigger.
Of course, you can do this in different triggers, but keep in mind, while the sim is paused, the user’s airplane is unable to reach any other AeraLandingTrigger, AirportLandingTrigger, CountTrigger, ProximityTrigger or PropertyTrigger if there is not any TimerTrigger running!
Best usage is in combination with a RequestTeleportAction.
Pause | If ticked, the simulator will pause, if unticked, the sim will unpause. |
PlayMusicAction
Plays a Wwise music file. See also ForceMusicAction and StopMusicAction
MusicSelection | Name of the Wwise music file. The Wwise music file must be located in the Additional Files folder in a subfolder named “wwise”. The file name is .PC.PCK. Example: If the MusicSelection is defined as “DISCOVERY_CARIBBEAN”, the file name must be DISCOVERY_CARIBBEAN.PC.PCK. The Wwise file must be defined with special properties that correspond to the MusicSelection name. |
FadeOutTime | Fade out time (in sec) |
IsLooping | Should the music restart automatically when it is finished? |
PointOfInterestActivation
A point of interest activation action will change the state of one or more Point of Interest objects. It is very similar to ObjectActivationAction, but also sets the current point of interest to be the one with the lowest cycle order in its list.
NewObjectState | Set to True or False. |
ObjectReferenceList | List of point of interests to have their status changed. In the left list you will find all available objects for this action, in the right one, the already selected. |
RandomAction
The random action is used to initiate one action from a list of possibilities.
ProbabilityPercent | The probability that any action at all will fire. Enter 100 to ensure an action will fire. |
Actions | List of actions from which one is chosen at random. |
RefillAction
A refill action is used to refuel aircraft with one or more types of fuel.
PercentFuel | Set to a number between 0.0 and 100.0, indicating how much fuel should be added to the tanks. |
PercentNitrous | Set to a number between 0.0 and 100.0, indicating how much fuel should be added to the Nitrous tanks. |
PercentAntiDetonation | Set to a number between 0.0 and 100.0, indicating how much fuel should be added to the AntiDetonation tanks. |
SystemIndex | The index number of the fuel tank, if the aircraft has more than one. Indexes start at 1. |
Currently (V1.19.9.0) the sim sets the minimum refuel quantity to 25%, even if a lower value is specified. For example, if you land with 7% and want to fill up with 10%, the sim uses 25% –> 7+25=32, so you have 32% on board after refueling.
RequestTeleportAction
Teleport your aircraft to a place in the world. Use this action in combination with FadeToColorAction, PauseSimAction and WaitAction.
Text | The text to appear on the screen. |
Pitch/Bank/Heading | Pitch, Bank and Heading, or orientations about the three axis, in degrees. |
Airspeed | The airspeed of your aircraft after teleport. |
Lat/Lon/Alt | Latitude, longitude, and altitude in feet |
IsOnGround | True, if the aircraft should be on ground (Alt is ignored when set). False, if it is on “Alt” altidue. |
WorldPosition | A select box for you to add Lat/Lon/Alt from Waypoints and Landmarks |
ResetTimerAction
The reset timer action is used to set the current time of a list of timers back to their start times.
Triggers | List of Timer Triggers to be reset. In the left list, you find all available timer triggers, the right list shows the already selected. |
StopMusicAction
Stops playing the specified music selection. See also ForceMusicAction and PlayMusicAction
MusicSelection | Name of the Wwise music file. The Wwise music file must be located in the Additional Files folder in a subfolder named “wwise”. The file name is .PC.PCK. Example: If the MusicSelection is defined as “DISCOVERY_CARIBBEAN”, the file name must be DISCOVERY_CARIBBEAN.PC.PCK. The Wwise file must be defined with special properties that correspond to the MusicSelection name. |
FadeOutTime | Fade out time (in sec) |
TextToSpeech (DialogAction)
A dialog action is used to add speech to be rendered over the audio system, and/or text to be displayed on the screen.
Text | The text to appear on the screen. Can be left blank. |
SoundFileName | The wave file to be rendered by the audio system. The file should be in the \sounds directory of the mission. Can be left blank. |
Delay | A delay in seconds after the text and audio are rendered. Can be used to allow time for the user to respond to the dialog, before performing another action. |
Speaker | The speaker, who is telling. Possible values are:Default ATC –> deactivated, CTD in-gameATC LEGACY –> deactivated, CTD in-gamePILOT COPILOT DEFAULT NARRATOR GWPS –> deactivated, CTD in-gameSCREEN READER –> deactivated, CTD in-game |
Speaker Name | Display text of the speaker’s name in the subtitles. If empty, Speaker is used. |
EndActions | An optional list of actions, which are executed after this action has been executed. |
You can reference other actions that will be executed when this action is completed. To do this, include one or more actions in the EndAction. Take care, you do not referencing in an infinity loop.
TimerAdjustAction
The timer adjust action adds the DeltaTime property value to the timer trigger’s internal clock
DeltaTime | A positive or negative timer adjustment, in seconds. |
Triggers | List of Timer Triggers to have the timer adjustment. In the left list, you find all available timer triggers, the right list shows the already selected. |
WaitAction
Action that does nothing… for a predefined time. Use this function to block the queue from performing any other action until a time period has elapsed.
Wait time | Time to wait for the next action in the queue in seconds. |
Areas
General Area Properties and Buttons
Following properties and buttons are available for all area definitions:
Descr | The name of the object. The system will generate a name such as CylinderArea1, simply be appending the number of the next object to the type of the object. This name can be edited to help identify it further. Make sure though that the name is unique. |
Show in Map | Clicking this button, shows the current selected area in the WorldMap with an rectangle, circle or polygon. If the “Ctrl”-Key is pressed when clicking on the button, all areas are shown in the Map. |
Paste | Paste coordinates from clipboard to the Lat/Lon field and the altitude of this point is calculated. If no valid coordinates are in the clipboard, nothing happens. |
Take | Take the coordinates from selected WorldPosition to the Lat/Lon field and the altitude of this point is calculated. |
CylinderArea
The CylinderAre defines a 3D Cylinder in the sim and has following properties:
Radius x H | Radius and Height of the cylinder in meters. See also “How the length, width and height works“. |
Pitch/Bank/Head | Pitch, Bank and Heading, or orientations about the three axis, in degrees. |
Lat/Lon/Alt | Latitude, longitude, and altitude in feet |
RectangleArea
The RectangleArea defines a 3D Box in the sim and has those properties :
L x W x H | Length, Width and Height of the box in meters. See also “How the length, width and height works“. |
Pitch/Bank/Head | Pitch, Bank and Heading, or orientations about the three axis, in degrees. |
Lat/Lon/Alt | Latitude, longitude, and altitude in feet |
How the length, width and height works
The length is the size of your 3D box in left and right dimensions relative to the bank angel. The image shows this with a bank of zero. With a heading of 0/360° (and bank of zero), the length defines the size in west-east direction.
The width defines the depth of the 3D box relative to the pitch. The images shows this with a pitch of zero. When your 3D box have a heading of zero (and a pitch of zero), the width defines the size in south-north direction.
The height defines the size of the box, from the selected altitude in 90° depending to pitch and bank. With a pitch and bank or zero, it grows in a 90° angel from the altitude in the axis from the midpoint of earth through the center location of your 3D-Box.
WorldObjects
WorldObjects are objects in the simulator, which can be placed everywhere on the virtual world.
General WorldObjects Properties
Descr | The name of the object. The system will generate a name such as LibObj1, simply be appending the number of the next object to the type of the object. This name can be edited to help identify it further. Make sure though that the name is unique. |
Text | Identifier for you inside of BushTripInjector only |
Activated | Set to True or False. This value can be changed during the mission with the ObjectActivationAction or PointOfInterestActivation. |
Container
With a container, you can setup additional mission scripts for individual objects, like AI objects. I.e. you can define AI aircrafts flying through the sky or moving on an airport. Also vehicles and animals can be animated with the mission script inside of a container.
Currently, the usage and generation is supported by BTI, but there is no GUI assistance for it.
To use containers, you need a deep knowledge of XML and the MSDS SDK.
The most common properties are:
ContainerTitle | Name of the container, linked with the SimObject. |
UseRegionContainerType | Is the sim object assigned to a region |
ContainerID | An ID used to link with the FLT for airplanes. |
IsOnGround | Is the sim object on ground |
Orientation | Pitch, Bank and Heading for the sim object |
EngineStarted | Is the engine started of the sim object |
IdentificationNumber | Aircraft tail/registration number |
AIType | One of:UNKNOWN |
AircraftAI | A container with several properties to describe the sim object. See AircraftAI. |
MDLGuid | The Guid of the sim objects model |
AttachedWorldPosition | Lat/Lon/Alt of the object |
AttachedWorldObject | Position linked to another world object |
AircraftAI
The AircraftAI object has several properties. The most common ones, but there are much more:
GroundCruiseSpeed | The speed over ground of the AI object |
GroundTurnSpeed | The turn speed over ground of the AI object |
GroundTurnTime | The turn time of the AI object |
YieldToUser | Stop if the user is in front of us? |
WaypointList | Path – list of waypoints. See WaypointList |
AircraftAIState | One of the following:WAIT_INIT_CONFIRM |
WaypointList
The WaypointList defines how the AI object moves around the world. It has following properties:
Waypoint | The definition of the waypoint with following properties:Descr |
CurrentWaypoint | Index of the waypoint we are currently tracking |
WrapWaypoints | Travel in a loop or stop at end of path? |
BackupToFirst | Do we drive in reverse to the first waypoint? |
AlwaysBackUp | Do we drive in reverse all the way? |
YieldToUser | Stop if the user is in front of us? |
KeepLastHeading | The AI should arrive with the same heading as the heading between last and before last waypoint |
CanReverse | Can the waypoint AI reverse if it missed its waypoint |
IngameMarker
The IngameMarker is used to highlight your POI, Landmarks or Waypoints for the user.
Text | Identifier for you inside of BushTripInjector only | |
Maintext | Main text of the Marker | |
Maintext-Color | The color of the main text | |
Secondarytext | Secondary text, will be displayed right of the main text inside the sim | |
AltitudeText | Tertiary text. Displayed below the main and secondary text. | |
Type | For Secondary- and Altitude text you can select if the text entered (TEXT), the distance of your aircraft to the marker (DISTANCE) or the altitude of the marker reference (ALTITUDE) is shown. | |
ShowDirection | Adds a 2D Marker showing the user the direction to the POI. | |
Icon | Shows a Icon for the marker or not. | |
Pitch/Bank/Heading | Pitch, Bank and Heading of the attached position | |
Lat/Lon/Alt | Latitude, Longitude and Altitude of the marker position | |
IsOnGround | Is the marked position on ground | |
AltitudeIsAGL | Checked: Altitude is above ground level. Unchecked: Altitude is mean sea level. | |
WorldPosition | A select box for you to add Lat/Lon/Alt from Waypoints and Landmarks |
LibraryObject
With the LibraryObject you can place static Models in your BushTrip. Activate or deactivate them with ObjectActivationActions.
Activated | Set to True or False. This value can be changed during the mission with the ObjectActivationAction. |
MDL Guid | The Guid of your model. This is the guid you defined when you create your own ModelLib. To use predefined models of the sim or some inside of your community folder, Click on the three dots button close to the MDL Guid. This will open the ModelGuidBrowser Window. |
Scale | A scale factor to display the Model. |
Pitch/Bank/Heading | Pitch, Bank and Heading of the attached position |
Lat/Lon/Alt | Latitude, Longitude and Altitude of the object |
IsOnGround | Is the object on ground |
AltitudeIsAGL | Checked: Altitude is above ground level. Unchecked: Altitude is mean sea level. |
WorldPosition | A select box for you to add Lat/Lon/Alt from Waypoints and Landmarks |
PointOfInterest
LivingWorldExclusion
With LivingWorldExclusion you can suppress certain elements of the simulator. This can be useful, for example, if the default exclusion of AI aircraft created by BTI does not fully represent the area at specific locations of an airport. Or also to keep parking spaces at a destination airport free to use for the user aircraft.
Aircraft | Exclude Living World AI Aircraft |
AirportVehicles | Exclude Living World airport ground vehicles |
FreewayTraffic | Exclude Living World Freeway Traffic |
ScheduledBoats | Exclude Living World Scheduled Boats |
RandomBoats | Exclude Living World Random Boats |
Areas | The areas where the above elements are to be excluded. |