DCS editor triggerBasics

From DCS World Wiki - Hoggitworld.com
Revision as of 23:47, 20 April 2018 by Grimes (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The trigger list consists of three columns.

  • Trigger Name/Type
  • Conditions
  • Actions


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


Continuous

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 Continuous 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