EVENT TRIGGER DEFINITIONS

The EventTrigger.xml file goes in the main mission folder beside the other files and folders required for the mission type, and is used to define different notification triggers that can be shown as a mission progresses. This file is formatted using XML and can be created or edited by using any text editor. The general format for the file is as follows:

<?xml version= "1.0" encoding= "utf-8" ?> 
<SimBase.Document Type="EventTriggers" version="1,0">
    <Descr>AceXML Document</Descr>
    <!-- First Event Trigger -->
    <EventTriggers.EventTrigger Name="TRIGGER_NAME">
        <!-- Trigger Information -->
        <Condition>
            <!-- RPN Condition To Trigger The Event -->
        </Condition>
        <Notification>
            <!-- Notification Data When Event Triggered -->          
        </Notification>
    </EventTriggers.EventTrigger>
    <!-- Further Triggers here -->
  </SimBase.Document>

Here you must include the <SimBase.Document> element along with the <Descr>AceXML Document</Descr> at the top of the document, and then you would have a list of different <EventTriggers.EventTrigger> elements to define the notification event triggers when the mission is being run.

 

You can find an example of this kind of file on the following page:

 

 

<EventTriggers.EventTrigger>

This is the main container element for a single event trigger, and you would normally have multiple of these within a single document. This element requires the following attribute:

 

Attribute Description Type Required
Name This is the name of the trigger and it should be unique String Yes

 

This element can contain the following sub-elements:

 

Element Description Type Required
<Source>

This element defines the source of the trigger event, as a string. The default value is "Copilot".

String Yes
<Context> The context of the trigger - this will affect whether or not a triggered event will show in the menu or in the simulation. Note that you may have multiple <Context> elements for a single event trigger.

String (one of the following):

  1. All
  2. Intro
  3. Preflight Gate
  4. Preflight Pushback
  5. Preflight Taxi
  6. Preflight Hold Short
  7. Flight Runway
  8. Flight InitialClimb
  9. Flight Climb
  10. Flight Cruise
  11. Flight Descent
  12. Landing Approach
  13. Landing Final
  14. Landing Touchdown
  15. Landing Groundroll
  16. Landing Taxi
  17. Landing Gate
  18. Landing Rest
  19. Waiting
  20. Teleport To State
  21. Freeflight
  22. Landing Challenge
  23. Bush trip
  24. Outro
Yes
<Type> The type of notification to be shown.

String (one of the following):

  1. Piloting
  2. Aircraft_Systems
  3. Flying_Tips
  4. Scoring
  5. Software_Tips
 
<MaxCount> This represents the max number notifications for this trigger. Float Yes
<VoiceOver> This is a container element used to define a sound file for any voice-over audio for the event. See the <VoiceOver> section, below No
<Cooldown> This defines the minimum time (in seconds) between two calls of this event trigger. Float No
<Notification> The notification properties for the event trigger. See the <Notification> section, below Yes
<StartElapsedTimeInContext> Minimum time to start the event trigger in the context. Float No
<AIControls> Set whether the AI should take the controls (True) or not (False). Bool No
<DisableIfIAHasControl> Disable the notification if the AI has control (True) or not (False). Bool No
<StartsEnabled>

Set whether the trigger starts disabled (True) or not (False). If false, the Trigger is disabled at the start and will need to be enabled before the event can be triggered.

Bool No
<EventTriggersToActivate_OnNotif> Sets another event trigger to be activated when the current notification is shown.

Requires the

<EventTriggers.ObjectReference />

element.

No
<EventTriggersToDeActivate_OnNotif> Deactivates another event trigger when the current notification is shown.

Requires the

<EventTriggers.ObjectReference />

element.

No
<EventTriggersToActivate_OnStopNotif> Sets another event trigger to be activated when the current notification is finished.

Requires the

<EventTriggers.ObjectReference />

element.

No
<EventTriggersToDeActivate_OnStopNotif> Deactivates another event trigger when the current notification is finished.

Requires the

<EventTriggers.ObjectReference />

element.

No
<Condition> The condition that causes the event trigger to execute. RPN conditional statement. No
<ConditionStartFlowEvents> FlowEvents that are triggered the first time the condition is met (and notification should appear)

Requires the <FlowEvent /> element.

No
<ConditionEndFlowEvents> FlowEvents that are triggered once the condition is not met, but was valid just before.

Requires the <FlowEvent /> element.

No

 

 

<VoiceOver>

This is a sub-element of the main <EventTriggers.EventTrigger> and is used to add voice-over sound effects to a trigger. The element can have the following attribute:

 

Attribute Description Type Required
TT This is a localized string that should be shown to represent what the voice-over is saying String No

 

This element should contain the following sub-element:

 

Element Description Type Required
<SoundFileName>

This is the name of the sound file that should be used for the voice-over.

String No

 

 

<Notification>

This element is a container for various sub-elements that are used to define the notification properties. The sub-elements that you can use are:

 

Element Description Type Required
<Priority> The notification priority. Default is "normal".

String:

  1. Urgent
  2. UrgentSpeed
  3. UrgentAltitude
  4. UrgentHeading
  5. Normal
  6. NormalSpeed
  7. NormalAltitude
  8. NormalHeading
  9. Low
  10. LowSpeed
  11. LowAltitude
  12. LowHeading
Yes
<Delay> The notification delay time. Float Yes
<Param> The parameters for the notification. See the <Param /> section, below. Yes

 

<Param />

This is a self-closing sub-element is used to set parameters for the <Notification> element, and each notification can have one or more of these sub-elements. The available attributes are:

 

Attribute Description Type Required
TextVariable This is a text Variable that will be replaced by the parameter for the notification. String No
Value This is a simple value parameter to the notification. Float No
Key Key text for the notification (needs to be formatted starting with "KEY_..."). String No
Simvar One of the available Simulation Variables to be used as a parameter. Float No
SimvarScale The value that the simvar parameter is multiplied by. Float No
SimvarUnit The Simulation Variable Units for the parameter. String No

 

 

<EventTriggers.ObjectReference />

This is a self-closing reference that is used by the following elements to define another event trigger: <EventTriggersToActivate_OnNotif>, <EventTriggersToDeActivate_OnNotif>, <EventTriggersToActivate_OnStopNotif>, <EventTriggersToDeActivate_OnStopNotif>. This element has a single attribute:

 

Attribute Description Type Required
id The unique ID of the event trigger being referenced. This ID is the <EventTriggers.EventTrigger> "Name" attribute. String Yes

 

 

<FlowEvent />

This is a self-closing reference that is used by the following elements to define a flow event trigger: <ConditionStartFlowEvents>, <ConditionEndFlowEvents>. This element has a single attribute:

 

Attribute Description Type Required
id The unique ID of the Flow Event to be triggered. String Yes