Part 2: Implementation
Here is the route as intended with the trigger areas moved away from the way-points for readability. Each of those trigger areas will sit (when moved back into place) directly on top of their assigned way-points.
The escort flight of M2000C fighters will have a route that overlays the escort route, allowing the clients to be properly briefed on their mission and to be able to understand the calls from the C-17.
Both units are tied to the 251 UHF Guard frequency to facilitate ‘communication’. Now we need to do the complicated parts and get all the behaviour ‘coded’.
There is (will be) a chart at the end of the steps that attempts to illustrate the process of using flags as triggers and states.
Step 1
TLDR: Set the Escort Target Options;
Add an ‘abort’ option to the escort target. For this, we add a ‘Triggered Action’ to the escort target. This will allow us to ‘call’ this operation via the communication menu. This triggered action instructs the escort target to switch to WP #6 - the RTB way-point.
Instruct the escort target to ‘Orbit’ at (WP #1). We will use the communication menu, in the steps below, to instruct the escort target to leave this orbit by setting Flag 154.
Note: Make the way-point speeds above 380. Way-point speeds in DCS are in ‘ground speed’ and not air speed. If, as in the screen shot above, you set the speed to something around 300, the unit may have a difficult time matching that speed.
Flag 150 |
Request: Spawn C-17; |
Step 2
TLDR: Add Initial Communication Menu Item to Spawn the C-17;
Add an item to the communication menu, allowing clients to request that the C-17 depart from Nellis;
This radio message will appear in the communications menu at the bottom (F10). It will, when executed (ie: called by a client by selecting the appropriate communication radio item, set Flag 150 to true (any non-zero value). We make this available at the start of the mission as part of a single execution trigger.
Step 3
TLDR: Process the Flag 150 ‘event’;
This step responds to the setting of Flag 150 and spawns the C-17 which will start it’s route toward the Orbit/Hold area of WP #1.
This trigger will spend a small bit of CPU time, each second, checking to see if Flag 150 is true. Upon detecting it we will:
- Turn off the Flag 150;
- Set Flag 151;
- Remove the radio menu item we added in Step 2 (preventing it from being called again);
- Activate the C-17;
- Send a message to the players - in this instance a text message;
Flag 150 |
Request: Spawn C-17; |
Flag 151 |
State: C-17 En Route to Orbit/Hold Area; |
Step 04
TLDR: Detect the Escort Target Entering the Orbit/Hold Area (TZ #1);
This step is a little more complicated. We are detecting that the escort target is entering the orbit area in order to add the ‘Push’ radio message to the communication menu. At this point, the escort target is ready to ‘Push’ to and through the escort corridor.
To do this we want to detect the C-17 entering TZ #1 while Flag 151 is set. This translates into the escort target entering TZ #1 while it is in the C-17 En Route to Orbit/Hold Area state. When those conditions are met:
- Turn off Flag 151;
- Set Flag 152;
- Add a radio item to the communication menu to instruct the C-17 to ‘Push’ - set Flag 153;
- Send a message to the players - in this instance a text message;
There is an implied communication happening here. When the escort target C-17 arrives at WP #1 and starts to orbit, it will announce this on it’s assigned UHF communication channel as a call from Springfield 1. Clients can/should be listening for this call as the text message sent to players is acting as a visible notification, rather than audio … if the clients are turned in properly.
The escort target will now proceed to orbit WP #1 (as instructed in Step 1) waiting for the clients to ask it to ‘Push’ via a communication radio item.
Flag 151 |
State: C-17 En Route to Orbit/Hold Area; |
Flag 152 |
State: C-17 Orbiting; |
Flag 153 |
Request: Push; |
Step 05
TLDR: Receive Request to Push;
Here, we wait on Flag 153 being set to true to trigger our next state change. Once it is detected, we set Flag 154 which, you may remember from Step 1 above, allows/instructs the C-17 to end the Orbit task at WP #1.
When Flag 153 is detected (set to true but the communication radio item call):
- Turn Flag 152 off;
- Turn Flag 153 off;
- Set Flag 154;
- Remove the ‘Push’ request communication radio item;
- Send a message to the players - in this instance a text message;
- Add a radio item to the communication menu to instruct the C-17 to ‘Abort’ - set Flag 155;
During this period, the escort target will push from WP #1 to WP #2 and continue through the route it has been assigned. While doing this, a communication radio item will exist that will allow clients to request that the escort target abort.
There is an implied communication happening here. When the escort target C-17 departs from WP #1 and starts to push, it will announce this on it’s assigned UHF communication channel as a call from Springfield 1. Clients can/should be listening for this call as the text message sent to players is acting as a visible notification, rather than audio. Also, as the escort target passes each assigned waypoint, there will be an audio call out … if the clients are turned in properly.
Flag 152 |
State: C-17 Orbiting; |
Flag 153 |
Request: Push; |
Flag 154 |
State: C-17 Pushing; |
Flag 155 |
Request: Abort; |
Step 06
TLDR: Detect the Escort Target ‘Completing’ the Assigned Task;
To do this we want to detect the C-17 entering TZ #2 while Flag 154 is set. This translates into the escort target entering TZ #2 while it is in the C-17 Pushing through the escort corridor. When those conditions are met:
- Turn off Flag 154;
- Send a message to the players - in this instance a text message;
- Remove the ‘Abort’ request communication radio item;
Flag 154 |
State: C-17 Pushing; |
Step 07
TLDR: Detect and Process the Abort Call from the Clients;
A little more complicated as we are calling a ‘Triggered Action’ for the C-17. For this we are ‘listening’ for Flag 155 to be set. This is set through execution of the communication radio item by a client established in Step 6.
To execute this:
- Turn off Flag 155;
- Remove the ‘Abort’ radio item;
- Order the C-17 execute the ‘Switch Waypoint’ triggered action;
- Send a message to the players - in this instance a text message;
At this point, the escort target will depart it’s current course and head to the RTB point at WP #6.
Step 08
TLDR: Cleanup;
Last step. Promise. When the escort target enters TZ #3, we remove it from the game. Here we clean up a little as a design choice. In this case I did not want to C-17 to circle around ‘out of sight’ and back to Nellis. Well, at least if the Abort call did not get made. In my mind, as mission designer, this represents the C-17 heading off on it’s own mysterious task.
This would have been the point where, with Lua scripting and MiST, it may be possible to reset the escort target back to it’s initial state and allow it to be triggered again. Maybe. Maybe.
Flag Trigger/State Diagram
And, after all of that, a flow chart that attempts to visually describe what is happening.