Kamron Posted October 13, 2018 Share Posted October 13, 2018 Hello everyboby I start the scripted missions, I want to use a radio command to destroy all the red planes in the air. I use MIST but I have not found this function. If anyone could help me ... thank you in advance Link to comment Share on other sites More sharing options...
feefifofum Posted October 13, 2018 Share Posted October 13, 2018 getcoalition will return the faction of the selected group or unit. If there aren't a ton of planes and you know how many will be airborne and their names, you can simply use group.getByName('whatever'):destroy() If you don't know or things are dynamically spawned you'll need to build a table by getting the coalition and aircraft type then running a loop to destroy all objects in the table. If you want them to visibly explode vs. just being removed from the sim, then this should work trigger.action.explosion(Unit.getByName('whatever'):getPosition().p, 200) MY MISSIONS AND CAMPAIGNS: THE GEORGIAN WAR - OFFICIAL F-15C DLC Operation Hydra - Large scale MP CO-OP in the Persian Gulf The New Soviet Republic - Ongoing MP CO-OP Campaign in the Caucasus region Operation Wax Wings - Large scale MP CO-OP in the Caucasus region Operation Lead Sky - Large scale MP CO-OP in the Persian Gulf Operation Skyhook - Large scale MP CO-OP in the Persian Gulf Link to comment Share on other sites More sharing options...
Kamron Posted October 13, 2018 Author Share Posted October 13, 2018 Concretely it is a mission training. I have two separate groups of 4 aircraft each. Currently I have a trigger (Clear all enemies) with two actions: group.getByName ('group1'): destroy () and group.getByName ('group2'): destroy (). It works if both groups are still in the air. but if one of the two groups does not exist anymore I have an error message of the script ... Link to comment Share on other sites More sharing options...
feefifofum Posted October 13, 2018 Share Posted October 13, 2018 Gotcha...you can disable that popup with a line of code, that's probably the best option. Run this at mission start. :thumbup: https://wiki.hoggitworld.com/view/DCS_func_setErrorMessageBoxEnabled MY MISSIONS AND CAMPAIGNS: THE GEORGIAN WAR - OFFICIAL F-15C DLC Operation Hydra - Large scale MP CO-OP in the Persian Gulf The New Soviet Republic - Ongoing MP CO-OP Campaign in the Caucasus region Operation Wax Wings - Large scale MP CO-OP in the Caucasus region Operation Lead Sky - Large scale MP CO-OP in the Persian Gulf Operation Skyhook - Large scale MP CO-OP in the Persian Gulf Link to comment Share on other sites More sharing options...
Kamron Posted October 13, 2018 Author Share Posted October 13, 2018 Thank you for this solution! Sorry as I do not master at all, all the functions of MIST, I do not understand how to write the code of this function What variable should I put? Can you get me the code to go on the editor please? Link to comment Share on other sites More sharing options...
Kamron Posted October 13, 2018 Author Share Posted October 13, 2018 I find it sorry : env.setErrorMessageBoxEnabled(false) Link to comment Share on other sites More sharing options...
Kamron Posted October 13, 2018 Author Share Posted October 13, 2018 Thank you very much for your help ! ;) Link to comment Share on other sites More sharing options...
Recommended Posts