Jump to content

Delete units faction with MIST


Kamron

Recommended Posts

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)

Link to comment
Share on other sites

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...