Trigger actions

Triggers gives you the ability to script actions during the mission.
The trigger system is not an "event" type system, but rather a "condition" type system; this means that a trigger does not occur when something occurs, but rather when a condition becomes TRUE.
When using triggers you'll ear a lot about Flags. Here are some important fact you want to know about Flags

DCS mission making triggers.jpg

Triggers list

This window will list all existing triggers of the mission therefore you better use your triggers names wisely.

Type

Comment

This is the name of your trigger. It should be self explanatory as you want to quickly understand what this trigger is used for.
PRO TIP:Try to group your triggers together chronologically by using a number in front of the trigger name (for example 01 - for the triggers on the ground at base, 02 for the triggers happening during the ingress, 03 for the triggers happening during the attacks etc ....) You can also use some special characther like /// to be able to find a particular trigger quickly in the list.

Event

Setting an event for a trigger limits the trigger's conditions to being evaluated only when the set events occur. With no event set, trigger conditions are evaluated once per second throughout the duration of the mission, unless already expired and removed from memory.
In a trigger-heavy mission, this can cost considerable CPU cycles and affect gameplay performance. Setting triggers to events can reduce the CPU workload and also provide some unique trigger mechanisms.
Several kinds of EVENT are available but the most useful is probably the ON DESTROY which gonna have his conditions evaluated whenever any unit is destroyed. (Really useful to save CPU when using a trigger that count dead units to trigger something like reinforcements for example)

Conditions

Once you have created a trigger, you will then need to set the conditions that govern when the trigger will be set to true or false. To do so, you first need to click on the trigger you want to set conditions for by clicking on it from the trigger list.
When multiple trigger conditions are set, they operate with an "AND" operator. In other words, all of the conditions must be true for the trigger to be activated. Press the OR button to separate conditions with an "OR" operator. In this case, the condition(s) either above or below the "OR" operator will activate the trigger.
Here is the list of the conditions types available in the mission editor:

Actions

Once you have defined the condition(s) that will determine when a trigger will be true or false, you now define the actions that will result. (you can define as many actions you want)
Here is the list of the actions available:

Vehicle movement

Make an AI helicopter to hover

Here is an easy trick to make your AI helicopter to remain stationary above a waypoint.

DCS Mission Making Make an AI helicopter to hover.png

Download the mission example

How to set up a tanker for air to air refueling

Before placing a tanker be advised that some airplanes are refueled using a flying boom (F16, F15 , etc ...) where others are using a probe and drogue (F18, Mirage 2000 etc ...) Therefore you have to choose the correct model of tanker in function of what kind of airplanes you want to refuel.

In this example, our tanker (a KC-130) will orbit in a racetrack pattern between steer 1 and 2 at 15 000 ft and 300 kts.
As I didn't set any stop condition it will orbit until it reaches his bingo fuel and then follow his waypoints to land at Kutaisi.
Players can use TCN 1X to find it.

DCS Mission Making add a tanker.png

Download the mission example