Mobius010 Posted November 22, 2021 Share Posted November 22, 2021 Hello everyone, I am creating a mission and I would like to create a F10 comms where pilots can see which objective is completed and which objective is not completed. Any ideas how to create something like that with triggers and/or scripts? Specs: Gigabyte Z390 AORUS PRO WIFI | CORSAIR RM Series RM750 | G.Skill Ripjaws V 32GB | Corsair H100X Extreme Performance | Adata XPG SX8200 Pro 1TB SSD | Intel Core i7 9700KF (not OC) | MSI GeForce RTX 2080 SUPER GAMING X TRIO (OC) Hardware: Logitech X56 HOTAS | Oculus Rift S | TM T. Flight Rudder Pedals Link to comment Share on other sites More sharing options...
Sabre-TLA Posted November 22, 2021 Share Posted November 22, 2021 It's pretty straight forward and we have it in our upcoming F-5E Aggressors Red Flag campaign. Set flags for each objective and then have a radio command that when activated polls the flags and sends the appropriate message. If you do it as a switched condition and reset the radio command flag then you can repeat it as many times as the user requests it. You will need messages for each combination of objectives (if you have more than one). For example we have Primary and Secondary objectives in our campaign so we needed 4 different messages. Primary Not Completed, Secondary Not Completed, Primary Completed, Secondary Not Completed, Primary Not Completed, Secondary Completed and Primary Completed and Secondary Completed. Hope that helps. MapleFlagMissions - Read Our Blog for Updates Link to comment Share on other sites More sharing options...
Mobius010 Posted November 23, 2021 Author Share Posted November 23, 2021 14 hours ago, Sabre-TLA said: It's pretty straight forward and we have it in our upcoming F-5E Aggressors Red Flag campaign. Set flags for each objective and then have a radio command that when activated polls the flags and sends the appropriate message. If you do it as a switched condition and reset the radio command flag then you can repeat it as many times as the user requests it. You will need messages for each combination of objectives (if you have more than one). For example we have Primary and Secondary objectives in our campaign so we needed 4 different messages. Primary Not Completed, Secondary Not Completed, Primary Completed, Secondary Not Completed, Primary Not Completed, Secondary Completed and Primary Completed and Secondary Completed. Hope that helps. Hmm okay but how does it know when an objective is destroyed? Im kinda following what you say but I still have no clue how to set it up. Can you give me an example? This is my first time doing a complex mission with triggers and scripts so with that, I'm pretty much a noob lol Specs: Gigabyte Z390 AORUS PRO WIFI | CORSAIR RM Series RM750 | G.Skill Ripjaws V 32GB | Corsair H100X Extreme Performance | Adata XPG SX8200 Pro 1TB SSD | Intel Core i7 9700KF (not OC) | MSI GeForce RTX 2080 SUPER GAMING X TRIO (OC) Hardware: Logitech X56 HOTAS | Oculus Rift S | TM T. Flight Rudder Pedals Link to comment Share on other sites More sharing options...
Sabre-TLA Posted November 23, 2021 Share Posted November 23, 2021 No problem. There are lots of good tutorials on Youtube and the DCS game manual is pretty good so I recommend you read it. If you know LUA scripting you can do even more things and using MIST as a framework can give you access to many of the internal functions. To keep it simple for now the Game Engine operates on Triggers and the triggers are evaluated every second. There are different types of triggers as well. ONCE triggers are evaluated every second and when their condition becomes true the game engine executes the action given and the trigger is then removed from the set of triggers for evaluation for the next second. A SWITCHED CONDITION trigger is evaluated every second and when their condition becomes true they execute their action, however they don't disappear from the list of triggers and are evaluated again in the next second. This way they are reusable. Trigger type Condition Action Comment ONCE TIME MORE (10) RADIO ITEM ADD (Target Status, 100, 1) -- Adds an F10 Radio Selection called Target Status uses Flag 100 SWITCHED CONDITION FLAG IS TRUE(100) MSG TO ALL (Is Target 1 Destroyed?) -- When player executes F10 selection displays message SWITCHED CONDITION TIME SINCE FLAG (100,6) MSG TO ALL (Target 1 is still Alive) -- 6 seconds after FLAG 100 is on and UNIT is alive display message UNIT ALIVE (Target 1) FLAG OFF (100) SWITCHED CONDITION TIME SINCE FLAG (100,6) MSG TO ALL (Target 1 is Destroyed) -- 6 seconds after FLAG 100 is on and UNIT is dead display message UNIT DEAD (Target 1) FLAG OFF (100) By turning FLAG 100 off and using switched conditions the set will repeat if the player selects the option to report again. You can add a sound file to play instead of printing a message or both. You can decide when to remove the RADIO ITEM by using RADIO ITEM REMOVE (Target Status) to remove it when desired. Please post if you have further questions. Thanks. 1 MapleFlagMissions - Read Our Blog for Updates Link to comment Share on other sites More sharing options...
Mobius010 Posted November 23, 2021 Author Share Posted November 23, 2021 50 minutes ago, Sabre-TLA said: No problem. There are lots of good tutorials on Youtube and the DCS game manual is pretty good so I recommend you read it. If you know LUA scripting you can do even more things and using MIST as a framework can give you access to many of the internal functions. To keep it simple for now the Game Engine operates on Triggers and the triggers are evaluated every second. There are different types of triggers as well. ONCE triggers are evaluated every second and when their condition becomes true the game engine executes the action given and the trigger is then removed from the set of triggers for evaluation for the next second. A SWITCHED CONDITION trigger is evaluated every second and when their condition becomes true they execute their action, however they don't disappear from the list of triggers and are evaluated again in the next second. This way they are reusable. Trigger type Condition Action Comment ONCE TIME MORE (10) RADIO ITEM ADD (Target Status, 100, 1) -- Adds an F10 Radio Selection called Target Status uses Flag 100 SWITCHED CONDITION FLAG IS TRUE(100) MSG TO ALL (Is Target 1 Destroyed?) -- When player executes F10 selection displays message SWITCHED CONDITION TIME SINCE FLAG (100,6) MSG TO ALL (Target 1 is still Alive) -- 6 seconds after FLAG 100 is on and UNIT is alive display message UNIT ALIVE (Target 1) FLAG OFF (100) SWITCHED CONDITION TIME SINCE FLAG (100,6) MSG TO ALL (Target 1 is Destroyed) -- 6 seconds after FLAG 100 is on and UNIT is dead display message UNIT DEAD (Target 1) FLAG OFF (100) By turning FLAG 100 off and using switched conditions the set will repeat if the player selects the option to report again. You can add a sound file to play instead of printing a message or both. You can decide when to remove the RADIO ITEM by using RADIO ITEM REMOVE (Target Status) to remove it when desired. Please post if you have further questions. Thanks. This is perfect! I got it to work! It even spawns a message when the objective is destroyed. Thank you so much Specs: Gigabyte Z390 AORUS PRO WIFI | CORSAIR RM Series RM750 | G.Skill Ripjaws V 32GB | Corsair H100X Extreme Performance | Adata XPG SX8200 Pro 1TB SSD | Intel Core i7 9700KF (not OC) | MSI GeForce RTX 2080 SUPER GAMING X TRIO (OC) Hardware: Logitech X56 HOTAS | Oculus Rift S | TM T. Flight Rudder Pedals Link to comment Share on other sites More sharing options...
Mobius010 Posted November 23, 2021 Author Share Posted November 23, 2021 (edited) 1 hour ago, Sabre-TLA said: No problem. There are lots of good tutorials on Youtube and the DCS game manual is pretty good so I recommend you read it. If you know LUA scripting you can do even more things and using MIST as a framework can give you access to many of the internal functions. To keep it simple for now the Game Engine operates on Triggers and the triggers are evaluated every second. There are different types of triggers as well. ONCE triggers are evaluated every second and when their condition becomes true the game engine executes the action given and the trigger is then removed from the set of triggers for evaluation for the next second. A SWITCHED CONDITION trigger is evaluated every second and when their condition becomes true they execute their action, however they don't disappear from the list of triggers and are evaluated again in the next second. This way they are reusable. Trigger type Condition Action Comment ONCE TIME MORE (10) RADIO ITEM ADD (Target Status, 100, 1) -- Adds an F10 Radio Selection called Target Status uses Flag 100 SWITCHED CONDITION FLAG IS TRUE(100) MSG TO ALL (Is Target 1 Destroyed?) -- When player executes F10 selection displays message SWITCHED CONDITION TIME SINCE FLAG (100,6) MSG TO ALL (Target 1 is still Alive) -- 6 seconds after FLAG 100 is on and UNIT is alive display message UNIT ALIVE (Target 1) FLAG OFF (100) SWITCHED CONDITION TIME SINCE FLAG (100,6) MSG TO ALL (Target 1 is Destroyed) -- 6 seconds after FLAG 100 is on and UNIT is dead display message UNIT DEAD (Target 1) FLAG OFF (100) By turning FLAG 100 off and using switched conditions the set will repeat if the player selects the option to report again. You can add a sound file to play instead of printing a message or both. You can decide when to remove the RADIO ITEM by using RADIO ITEM REMOVE (Target Status) to remove it when desired. Please post if you have further questions. Thanks. Okay, I do have a question. Is there a way with triggers and flags to create a single list with what is destroyed and a single list with what is still active? I have more then 10 objectives so I am running out of F keys Edited November 23, 2021 by Mobius010 Specs: Gigabyte Z390 AORUS PRO WIFI | CORSAIR RM Series RM750 | G.Skill Ripjaws V 32GB | Corsair H100X Extreme Performance | Adata XPG SX8200 Pro 1TB SSD | Intel Core i7 9700KF (not OC) | MSI GeForce RTX 2080 SUPER GAMING X TRIO (OC) Hardware: Logitech X56 HOTAS | Oculus Rift S | TM T. Flight Rudder Pedals Link to comment Share on other sites More sharing options...
Sabre-TLA Posted November 23, 2021 Share Posted November 23, 2021 Yes! Instead of using the UNIT ALIVE or UNIT DEAD conditions in the message trigger you could set those up as separate triggers and then set a flag. I haven't tested the limit but I believe 4 digit flags are possible so from 0 to 9999. Lots to work with. For example: Trigger type Condition Action Comment ONCE UNIT DEAD (Target 1) FLAG ON (200) -- Checks all targets for DEAD or set different flags for different sets UNIT DEAD (Target 2) of targets. SWITCHED CONDITION FLAG IS TRUE(100) MSG TO ALL (Is Target 1 Destroyed?) -- When player executes F10 selection displays message SWITCHED CONDITION TIME SINCE FLAG (100,6) MSG TO ALL (Some targets are Alive!) -- 6 seconds after FLAG 100 is on and UNIT is alive display message FLAG IS FALSE (200) FLAG OFF (100) SWITCHED CONDITION TIME SINCE FLAG (100,6) MSG TO ALL (All Targets Destroyed!) -- 6 seconds after FLAG 100 is on and UNIT is dead display message FLAG IS TRUE (200) FLAG OFF (100) Depending on your target sets you could have 10 primary and 20 secondary targets and set flags when appropriate combinations of them have been destroyed and a matching message. For example if 50% of the primary targets are destroyed, your message could say that based on a flag value being set. Obviously the more targets you have the more combinations of messages you will need but it's not too difficult with the basic ME trigger model. With scripting you could do it a different way but scripting can have it's own set of problems if you know what I mean. MapleFlagMissions - Read Our Blog for Updates Link to comment Share on other sites More sharing options...
Mobius010 Posted November 23, 2021 Author Share Posted November 23, 2021 14 minutes ago, Sabre-TLA said: Yes! Instead of using the UNIT ALIVE or UNIT DEAD conditions in the message trigger you could set those up as separate triggers and then set a flag. I haven't tested the limit but I believe 4 digit flags are possible so from 0 to 9999. Lots to work with. For example: Trigger type Condition Action Comment ONCE UNIT DEAD (Target 1) FLAG ON (200) -- Checks all targets for DEAD or set different flags for different sets UNIT DEAD (Target 2) of targets. SWITCHED CONDITION FLAG IS TRUE(100) MSG TO ALL (Is Target 1 Destroyed?) -- When player executes F10 selection displays message SWITCHED CONDITION TIME SINCE FLAG (100,6) MSG TO ALL (Some targets are Alive!) -- 6 seconds after FLAG 100 is on and UNIT is alive display message FLAG IS FALSE (200) FLAG OFF (100) SWITCHED CONDITION TIME SINCE FLAG (100,6) MSG TO ALL (All Targets Destroyed!) -- 6 seconds after FLAG 100 is on and UNIT is dead display message FLAG IS TRUE (200) FLAG OFF (100) Depending on your target sets you could have 10 primary and 20 secondary targets and set flags when appropriate combinations of them have been destroyed and a matching message. For example if 50% of the primary targets are destroyed, your message could say that based on a flag value being set. Obviously the more targets you have the more combinations of messages you will need but it's not too difficult with the basic ME trigger model. With scripting you could do it a different way but scripting can have it's own set of problems if you know what I mean. You are amazing sir! Thank you very much for the detailed explanation and with the perfect example! You are making triggers and flags look easy. I will try it out tomorrow! 1 Specs: Gigabyte Z390 AORUS PRO WIFI | CORSAIR RM Series RM750 | G.Skill Ripjaws V 32GB | Corsair H100X Extreme Performance | Adata XPG SX8200 Pro 1TB SSD | Intel Core i7 9700KF (not OC) | MSI GeForce RTX 2080 SUPER GAMING X TRIO (OC) Hardware: Logitech X56 HOTAS | Oculus Rift S | TM T. Flight Rudder Pedals Link to comment Share on other sites More sharing options...
Mobius010 Posted November 23, 2021 Author Share Posted November 23, 2021 3 hours ago, Sabre-TLA said: Yes! Instead of using the UNIT ALIVE or UNIT DEAD conditions in the message trigger you could set those up as separate triggers and then set a flag. I haven't tested the limit but I believe 4 digit flags are possible so from 0 to 9999. Lots to work with. For example: Trigger type Condition Action Comment ONCE UNIT DEAD (Target 1) FLAG ON (200) -- Checks all targets for DEAD or set different flags for different sets UNIT DEAD (Target 2) of targets. SWITCHED CONDITION FLAG IS TRUE(100) MSG TO ALL (Is Target 1 Destroyed?) -- When player executes F10 selection displays message SWITCHED CONDITION TIME SINCE FLAG (100,6) MSG TO ALL (Some targets are Alive!) -- 6 seconds after FLAG 100 is on and UNIT is alive display message FLAG IS FALSE (200) FLAG OFF (100) SWITCHED CONDITION TIME SINCE FLAG (100,6) MSG TO ALL (All Targets Destroyed!) -- 6 seconds after FLAG 100 is on and UNIT is dead display message FLAG IS TRUE (200) FLAG OFF (100) Depending on your target sets you could have 10 primary and 20 secondary targets and set flags when appropriate combinations of them have been destroyed and a matching message. For example if 50% of the primary targets are destroyed, your message could say that based on a flag value being set. Obviously the more targets you have the more combinations of messages you will need but it's not too difficult with the basic ME trigger model. With scripting you could do it a different way but scripting can have it's own set of problems if you know what I mean. I have a problem. I did what you wrote and the first objective is good But the second and so on won't show up. I called first one "flag 200" and the second one "flag 201", third objective "flag 203" and so on. What could be the problem? Specs: Gigabyte Z390 AORUS PRO WIFI | CORSAIR RM Series RM750 | G.Skill Ripjaws V 32GB | Corsair H100X Extreme Performance | Adata XPG SX8200 Pro 1TB SSD | Intel Core i7 9700KF (not OC) | MSI GeForce RTX 2080 SUPER GAMING X TRIO (OC) Hardware: Logitech X56 HOTAS | Oculus Rift S | TM T. Flight Rudder Pedals Link to comment Share on other sites More sharing options...
Sabre-TLA Posted November 23, 2021 Share Posted November 23, 2021 Without seeing your trigger logic it's hard to know. What do you mean they won't show up? The messages? Make sure you are matching the appropriate flags to each message. Add your .miz to the thread if it's not too big or post a screen shot and we can take a look. MapleFlagMissions - Read Our Blog for Updates Link to comment Share on other sites More sharing options...
Mobius010 Posted November 24, 2021 Author Share Posted November 24, 2021 There are 2 "Once" Triggers named Objective Batumi, the second one is just named wrong. It does have the targets at Sukhumi Specs: Gigabyte Z390 AORUS PRO WIFI | CORSAIR RM Series RM750 | G.Skill Ripjaws V 32GB | Corsair H100X Extreme Performance | Adata XPG SX8200 Pro 1TB SSD | Intel Core i7 9700KF (not OC) | MSI GeForce RTX 2080 SUPER GAMING X TRIO (OC) Hardware: Logitech X56 HOTAS | Oculus Rift S | TM T. Flight Rudder Pedals Link to comment Share on other sites More sharing options...
Sabre-TLA Posted November 24, 2021 Share Posted November 24, 2021 (edited) These are AND conditions so for 301 to be set all units in all the groups have to actually be dead. Check your log to see if that is the case. What happens if you change TIME SINCE FLAG (200, 1) to FLAG IS TRUE (200)? I don't think the 1 sec delay is needed. I have experienced some weird behavior with GROUP DEAD so you could also replace it with UNIT DEAD for each individual unit to be certain they are all destroyed. Not sure if STATIC elements actually register as dead. Try with actual units instead. If you need to detect a building or bridge is destroyed place a soldier unit beside it and test to see if the soldier is dead. Edited November 24, 2021 by Sabre-TLA MapleFlagMissions - Read Our Blog for Updates Link to comment Share on other sites More sharing options...
Mobius010 Posted November 25, 2021 Author Share Posted November 25, 2021 (edited) 15 hours ago, Sabre-TLA said: These are AND conditions so for 301 to be set all units in all the groups have to actually be dead. Check your log to see if that is the case. What happens if you change TIME SINCE FLAG (200, 1) to FLAG IS TRUE (200)? I don't think the 1 sec delay is needed. I have experienced some weird behavior with GROUP DEAD so you could also replace it with UNIT DEAD for each individual unit to be certain they are all destroyed. Not sure if STATIC elements actually register as dead. Try with actual units instead. If you need to detect a building or bridge is destroyed place a soldier unit beside it and test to see if the soldier is dead. I made a mission just to test out the triggers and flag. Mission is as following: Test 1 Group: 1x BTR-80 Test 2 Group: 1x BTR-80 Test 3 Group: 6x M1A2 Abrams (To destroy Test 1 Group) Test 4 Group: 6x M1A2 Abrams (To destroy Test 2 Group) I used the triggers how you wrote it and still the only message that pops up is for Test 1 Group. When Test 1 Group is alive the Active message appears, when Test 1 Group is dead the Destroyed message appears. But for Test 2 Group nothing appears at all, not even when its alive. I tried it with UNIT DEAD, with GROUP DEAD, with FLAG IS TRUE and with TIME SINCE FLAG. Any idea why this isnt working for me? Edit: The RADIO ITEM ADD has flag 200. So I added a second trigger Radio Item with RADIO ITEM ADD flag 201 and used it for Test 2 Group. It does show up now. So for some reason if I have 2 or more groups thats linked to RADIO ITEM ADD flag 200 only the first group is linked. The other group(s) aren't linked Edit 2: Added a fifthTest group that doesn't get destroyed. A message does appear that Test 5 Group is still active when Test Group 1 and 2 are destroyed. So for some reason the RADIO ITEM can only make 1 message appear instead of a message with ALL units that are active/alive Edited November 25, 2021 by Mobius010 Specs: Gigabyte Z390 AORUS PRO WIFI | CORSAIR RM Series RM750 | G.Skill Ripjaws V 32GB | Corsair H100X Extreme Performance | Adata XPG SX8200 Pro 1TB SSD | Intel Core i7 9700KF (not OC) | MSI GeForce RTX 2080 SUPER GAMING X TRIO (OC) Hardware: Logitech X56 HOTAS | Oculus Rift S | TM T. Flight Rudder Pedals Link to comment Share on other sites More sharing options...
Sabre-TLA Posted November 25, 2021 Share Posted November 25, 2021 Glad you got it to work! MapleFlagMissions - Read Our Blog for Updates Link to comment Share on other sites More sharing options...
Mobius010 Posted November 25, 2021 Author Share Posted November 25, 2021 Just now, Sabre-TLA said: Glad you got it to work! Its not how I want it to work. I want 1 list that appears with all the objectives active and 1 list that appears with all the objectives destroyed. So for example: Objective Completed: Objective 1 active Objective 2 active Objective 4 active And so on Objective Destroyed: Objective 3 destroyed Objective 5 destroyed And so on But I cant get it to work. I can only make a message appear for 1 objective that is active or destroyed Specs: Gigabyte Z390 AORUS PRO WIFI | CORSAIR RM Series RM750 | G.Skill Ripjaws V 32GB | Corsair H100X Extreme Performance | Adata XPG SX8200 Pro 1TB SSD | Intel Core i7 9700KF (not OC) | MSI GeForce RTX 2080 SUPER GAMING X TRIO (OC) Hardware: Logitech X56 HOTAS | Oculus Rift S | TM T. Flight Rudder Pedals Link to comment Share on other sites More sharing options...
Mobius010 Posted November 25, 2021 Author Share Posted November 25, 2021 (edited) 29 minutes ago, Sabre-TLA said: Glad you got it to work! Its not how I want it to work. I want 1 list that appears with all the objectives active and 1 list that appears with all the objectives destroyed. So for example: Objective Completed: Objective 1 active Objective 2 active Objective 4 active And so on Objective Destroyed: Objective 3 destroyed Objective 5 destroyed And so on But I cant get it to work. I can only make a message appear for 1 objective that is active or destroyed Edit: I got it to work! I removed the FLAG OFF. That makes it continue to look for active units and makes the messages apear when they are active Edited November 25, 2021 by Mobius010 1 Specs: Gigabyte Z390 AORUS PRO WIFI | CORSAIR RM Series RM750 | G.Skill Ripjaws V 32GB | Corsair H100X Extreme Performance | Adata XPG SX8200 Pro 1TB SSD | Intel Core i7 9700KF (not OC) | MSI GeForce RTX 2080 SUPER GAMING X TRIO (OC) Hardware: Logitech X56 HOTAS | Oculus Rift S | TM T. Flight Rudder Pedals Link to comment Share on other sites More sharing options...
Paladin1cd Posted December 6, 2021 Share Posted December 6, 2021 Hi all, I am attempting to do the same thing with a mission and I am struggling somewhere along the way. Could I send a miz file to one of you to check out? I think the important parts are the last part of my triggers and could fling it through discord. Not sure about taking enough screenshots to make it clear what I've done and where I went wrong. The radio message populates but does not seem to pull anything. Link to comment Share on other sites More sharing options...
Mobius010 Posted December 13, 2021 Author Share Posted December 13, 2021 On 12/7/2021 at 12:25 AM, Paladin1cd said: Hi all, I am attempting to do the same thing with a mission and I am struggling somewhere along the way. Could I send a miz file to one of you to check out? I think the important parts are the last part of my triggers and could fling it through discord. Not sure about taking enough screenshots to make it clear what I've done and where I went wrong. The radio message populates but does not seem to pull anything. Sure, add me on Discord: Mobius01#5074 Specs: Gigabyte Z390 AORUS PRO WIFI | CORSAIR RM Series RM750 | G.Skill Ripjaws V 32GB | Corsair H100X Extreme Performance | Adata XPG SX8200 Pro 1TB SSD | Intel Core i7 9700KF (not OC) | MSI GeForce RTX 2080 SUPER GAMING X TRIO (OC) Hardware: Logitech X56 HOTAS | Oculus Rift S | TM T. Flight Rudder Pedals Link to comment Share on other sites More sharing options...
Recommended Posts