Difference between revisions of "DCS editor triggerBasics"
(No difference)
|
Revision as of 23:47, 20 April 2018
The trigger list consists of three columns.
- Trigger Name/Type
- Conditions
- Actions
Contents
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".
Continuous
Condition: Evaluated Continuously.
Event: Defines when condition is checked.
Action: Repeated every time as long as the conditions stays "True".
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"
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
"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