Difference between revisions of "DCS editor triggerBasics"

From DCS World Wiki - Hoggitworld.com
 
 
Line 1: Line 1:
The trigger list consists of three columns.  
+
== Introduction ==
 +
The triggers menu is used to create and edit triggers in a mission that can govern any game logic a user can dream up. It primarily consists of three columns that define different parameters for each trigger. By default the conditions and actions columns will be blank until you select a trigger in the left most column. Each column as up and down arrows used to move the selected action within each relevant column.  
  
*Trigger Name/Type
+
=== Triggers ===
*Conditions
+
Name of the trigger, how it executes, and UI color to easily categorize multiple triggers.
*Actions
 
  
 +
*Type  : How the conditions will be evaluated.
 +
*Name  : Name for ease of use when editing. Name will default to "Trigger <Time when it was created>"
 +
*Event  : Whether the condition will be checked when game events occur. Defaults to no event.
 +
*Color  : RGB values to help organize the trigger list.
  
 +
=== Conditions ===
 +
The statements that have to occur in order for the designated action to take place.
 +
List of commands that get executed when the conditions are met.
 +
*Type          : The type of trigger action .
 +
*Action Values : List of values relevant to a given action. Can be a dropdown menu or text box.
 +
=== Actions ===
 +
List of commands that get executed when the conditions are met.
 +
*Type            : The type of trigger condition.
 +
*Condition Values : List of values relevant to a given condition. Can be a dropdown menu or text box.
 +
=== UI ===
 +
[[File:Triggers_main_page.png]]
  
 
== Trigger Types ==
 
== Trigger Types ==
Line 19: Line 34:
  
  
=== Continuous ===  
+
=== Repetitive Action ===  
 
Condition: Evaluated Continuously.  
 
Condition: Evaluated Continuously.  
  
Line 49: Line 64:
  
 
=== Events ===
 
=== Events ===
Events are available only for Once and Continuous trigger types. Triggers with a defined event will only be checked whenever the specified event occurs within the mission.
+
Events are available only for Once and Repetitive trigger types. Triggers with a defined event will only be checked whenever the specified event occurs within the mission.
  
 
It is also worth noting that the "Mission Start" trigger type functions the same as a "Once" Trigger with an event of "Mission Start" would. This event type does not exist however.   
 
It is also worth noting that the "Mission Start" trigger type functions the same as a "Once" Trigger with an event of "Mission Start" would. This event type does not exist however.   

Latest revision as of 08:40, 23 June 2021

Introduction

The triggers menu is used to create and edit triggers in a mission that can govern any game logic a user can dream up. It primarily consists of three columns that define different parameters for each trigger. By default the conditions and actions columns will be blank until you select a trigger in the left most column. Each column as up and down arrows used to move the selected action within each relevant column.

Triggers

Name of the trigger, how it executes, and UI color to easily categorize multiple triggers.

  • Type  : How the conditions will be evaluated.
  • Name  : Name for ease of use when editing. Name will default to "Trigger
  • Event  : Whether the condition will be checked when game events occur. Defaults to no event.
  • Color  : RGB values to help organize the trigger list.

Conditions

The statements that have to occur in order for the designated action to take place. List of commands that get executed when the conditions are met.

  • Type  : The type of trigger action .
  • Action Values : List of values relevant to a given action. Can be a dropdown menu or text box.

Actions

List of commands that get executed when the conditions are met.

  • Type  : The type of trigger condition.
  • Condition Values : List of values relevant to a given condition. Can be a dropdown menu or text box.

UI

Triggers main page.png

Trigger Types

Once

Condition: Evaluated Continuously, until it is evaluated as "True". Then removed from the list of evaluations.

Event: Defines when condition is checked.

Action: Activated Once, when condition is "true".

Once logic.png


Repetitive Action

Condition: Evaluated Continuously.

Event: Defines when condition is checked.

Action: Repeated every time as long as the conditions stays "True".

Continous condition.png

Switched Condition

Condition: Evaluated Continuously.

Action: Repeatable, Once per condition-set changes from "False" -> "True". Actions will be performed again on the next "Switched state-change"

Swiched conition logic.png


Mission Start

Condition: Evaluated Once, at mission startup.

Action: Performed Once, at mission startup.

Evaluating Triggers

Triggers are evaluated either at a default interval or during an event.

Default

All triggers are evaluated at a set interval of once per second. If a trigger type of "Once" is evaluated true it is removed from the list.

Events

Events are available only for Once and Repetitive trigger types. Triggers with a defined event will only be checked whenever the specified event occurs within the mission.

It is also worth noting that the "Mission Start" trigger type functions the same as a "Once" Trigger with an event of "Mission Start" would. This event type does not exist however.

Event Types:

  • On Destroy
  • On Shot
  • On Crash
  • On Eject
  • On Failure
  • On Pilot Dead
  • On Take Control
  • On Refuel
  • On Refuel Stop
  • On Base Captured

Multiple Conditions

The condition column can have multiple conditions for each trigger. When multiple conditions are used the mission editors defaults to using what is known as an "and" logic operator. The user also has the option to separate conditions with an "or" logic operator. The difference is explained below.

"And" Conditions

And conditions require all conditions linked to be true in order for the trigger to be evaluated true.

Example in Pseudo Code: If X AND Y AND Z are all true, Then Do action

Multiple conditions and.png

"Or" Conditions

Or conditions require any condition linked to be true in order for the trigger to be evaluated true.

Example in Pseudo Code: If any of the X OR Y OR Z is true, Then Do action


Multiple conditions or.png