DCS mission making - trigger actions and vehicle movement
Contents
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
- Flags can be either Boolean (true/false/0/1) or a numerical value.
- FLAG IS TRUE checks for any value higher than 0.
- FLAG ON increases the flag value from 0 to 1.
- FLAG INCREASE adds a numerical value to the flag. (Useful if you're trying to tally a number of kills or hits)
Triggers list
This window will list all existing triggers of the mission therefore you better use your triggers names wisely.
Type
- ONCE. The trigger will be executed only once after the condition is evaluated as true. Once set as true, the condition is removed from memory
- CONTINUOUS ACTION. The Continuous Action trigger checks the trigger's conditions each second. Each second the conditions return true, the actions are performed; each second the conditions are false, no action is not performed
- SWITCHED CONDITION. The trigger will perform the set action(s) every time the trigger's condition is checked and evaluated as true and its previous state was false
- MISSION START. The trigger will only be checked at mission start
Comment
Event
Conditions
Actions
Vehicle movement
Make an AI helicopter to hover
Here is an easy trick to make your AI helicopter to remain stationary above a waypoint.
- Place your helicopter on the map and set the usual options like Country, Type, Skill etc .... Create a flight plan. Use as much waypoints as you want.
- Select the waypoint where you want your helicopter to remain stationary and click on ADD in advanced waypoint actions
- Select the following settings : TYPE - Perform Task , ACTION - Orbit , SPEED - 0 and set the ALTITUDE to wathever altitude you want the helicopter to hover
- Optionnaly you can add a stop condition to make it stop the hover and proceed with the rest of his flight plan (in this example I've set up a duration of 2 mn which mean that when the Gazelle will reach waypoint 2 she will hover for 2 mn before proceding to waypoint 3)
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.
- Place a tanker on the map and set the usual options and be sure his TASK is set to Refueling. (should be selected as default)
- Create a flight plan (don't make it to fly too high or to fast to ease up the AAR)
- At the first waypoint where you want your tanker to start his racetrack pattern (in our example waypoint 1) click on ADD in advanced waypoint actions
- Select the following settings : TYPE - Perform Task , ACTION - Orbit , PATTERN - Race-track , SPEED - 300 kts and set the ALTITUDE to 15 000 ft. Your tanker will now orbit between waypoint 1 & 2 until it reaches his bingo fuel. (you can also assign a stop condition like a duration , a trigger etc ...) PRO TIP: Tankers are always doing a left hand turn in their orbit.
- Optionnaly you can add a tacan to your tanker (Normally DCS will automaticaly assign a TCN to your tankers) To do this just go on Waypoint 0 and open the advanced waypoint actions. Click on ADD and select TYPE - Perform Command , ACTION - Activate TACAN and then select a channel , a channel mode and the callsign of the TCN station (usualy TKR for tanker). If you already have an existing Tacan in the the advanced waypoint actions window just double click on it to edit its informations.
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.