# Event Trigger XML Properties 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](../../devmode/editors/project-editor/file-formats/xml-files/) and can be created or edited by using any text editor. The general format for the file is as follows: ``` xml AceXML Document ```   Here you *must* include the `` element along with the `AceXML Document` at the top of the document, and then you would have a list of different `` 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: - [Complete Event Trigger Example](flight-weather-event-examples/#Event)     ### <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:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |-----------|---------------------------------------------------------|--------|:--------:| | `Name` | This is the name of the trigger and it should be unique | String | Yes | {{< /table-wrapper >}}   This element can contain the following sub-elements: 1. `` (Required) 2. `` (Required) 3. `` (Required) 4. `` (Required) 5. `` (Required) 6. `` 7. `` 8. `` 9. `` 10. `` 11. `` 12. `` 13. `` 14. `` 15. `` 16. `` 17. `` 18. ``     ### <Source> This required sub-element of `` defines the source of the trigger event, as a string. The default value is "Copilot".     ### <Context> This required sub-element of `` sets the context of the trigger. The value here will affect whether or not a triggered event will show in the menu, or in the simulation. Note that you may have multiple `` elements for a single event trigger.   The allowed values are as follows: 1. All 2. Intro 3. Preflight Gate 4. Preflight Pushback 5. Preflight Taxi 6. Preflight Hold Short 7. Flight Runway 8. Flight Initial Climb 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     ### <Type> This required sub-element of `` sets the type of notification to be shown. Can be any one of the following values: 1. Piloting 2. Aircraft\_Systems 3. Flying\_Tips 4. Scoring 5. Software\_Tips     ### <MaxCount> This sub-element of `` represents the maximum number of notifications for this trigger.     ### <Cooldown> This sub-element of `` defines the minimum permitted time (in seconds) between two calls of this event trigger.     ### <StartElapsedTimeInContext> This sub-element of `` defines the minimum time to start the event trigger in the context.     ### <AIControls> This sub-element of `` sets whether the AI should take the controls (True) or not (False).     ### <DisableIfIAHasControl> This sub-element of `` sets whether the notification for when the AI has control should be shown (True) or not (False).     ### <StartsEnabled> This sub-element of `` sets 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 in the future.     ### <EventTriggersToActivate_OnNotif> This sub-element of `` sets another event trigger to be activated when the current notification is shown. Requires the `` as a sub-element.     ### <EventTriggersToDeActivate_OnNotif> This sub-element of `` deactivates another event trigger when the current notification is shown. Requires the `` as a sub-element.     ### <EventTriggersToActivate_OnStopNotif> This sub-element of `` sets another event trigger to be activated when the current notification is finished. Requires the `` as a sub-element.     ### <EventTriggersToDeActivate_OnStopNotif> This sub-element of `` deactivates another event trigger when the current notification is finished. Requires the `` as a sub-element.     ### <Condition> This sub-element of `` defines the condition that causes the event trigger to execute using [RPN](../../programming-apis/reverse-polish-notation/).     ### <ConditionStartFlowEvents> This sub-element of `` sets the FlowEvents that are triggered the first time the condition is met (and a notification should appear). Requires `` as a sub-element.     ### <ConditionEndFlowEvents> This sub-element of `` sets the FlowEvents that are triggered once the condition is not met, but was valid just before. Requires `` as a sub-element.     ### <VoiceOver> This is a sub-element of the main `` and is used to add voice-over sound effects to a trigger. The element can have the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |-----------|--------------------------------------------------------------------------------------------|--------|:------------------------------------------:| | `TT` | This is a localized string that should be shown to represent what the voice-over is saying | String | No | {{< /table-wrapper >}}   This element should contain the following sub-element: 1. ``   #### <SoundFileName> This is the name of the sound file that should be used for the voice-over.     ### <Notification> This required sub-element of the main `` element is a container for various sub-elements that are used to define the notification properties. The sub-elements that you can use are: 1. `` 2. `` 3. ``   #### <Priority> This is a sub-element of ``, and sets the notification priority. If not included, this will default to "normal". Available values are as follows: 1. Urgent 2. UrgentSpeed 3. UrgentAltitude 4. UrgentHeading 5. Normal 6. NormalSpeed 7. NormalAltitude 8. NormalHeading 9. Low 10. LowSpeed 11. LowAltitude 12. LowHeading   #### <Delay> This is a sub-element of ``, and sets the notification delay time in seconds.   #### <Param /> This is a self-closing sub-element is used to set parameters for the `` element, and each notification can have one or more of these sub-elements. The available attributes are:   {{< table-wrapper >}} | 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](../../programming-apis/simvars/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](../../programming-apis/simvars/simulation-variable-units/) for the parameter. | String | No | {{< /table-wrapper >}}     ### <EventTriggers.ObjectReference /> This is a self-closing reference that is used by the following elements to define another event trigger: 1. `` 2. `` 3. `` 4. ``   This element has a single attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |-----------|----------------------------------------------------------------------------------------------------------------------|--------|:-------------------------------------------:| | `id` | The unique ID of the event trigger being referenced. This ID is the `` "Name" attribute. | String | Yes | {{< /table-wrapper >}}     ### <FlowEvent /> This is a self-closing reference that is used by the following elements to define a flow event trigger: 1. `` 2. ``   This element has a single attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |-----------|--------------------------------------------------|--------|:-------------------------------------------:| | `id` | The unique ID of the Flow Event to be triggered. | String | Yes | {{< /table-wrapper >}}