tn_prvteye Posted December 11, 2017 Share Posted December 11, 2017 I've got a mission where random groups of Ground and Air Vehicles spawn in. Since they don't obviously show up in the ME, is there any way to assign points for killing them, or verifying that they are dead? I'd like to get a "Mission Complete" message, or something like that, if they are all destroyed. I suck at LUA scripting (my code is all stolen), so pretend like you're talking to a moron. :D Link to comment Share on other sites More sharing options...
deadlyfishes Posted December 12, 2017 Share Posted December 12, 2017 I've struggled with this for dynamically created air units, I still haven't found a simple way for detecting them being dead. However, an easy way to detect ground units, especially if they don't move far or at all, is to just use a ME trigger with the condition all of red out of zone. "Through The Inferno" Endless, Dynamic, Open-World Experience for DCS World Website | Discord | Support TTI on Patreon SP Missions: Caucasus | NTTR | Syria | Mariana Islands | Persian Gulf | Normandy | South Atlantic | Sinai MP Servers: PvE Server Link to comment Share on other sites More sharing options...
Grimes Posted December 12, 2017 Share Posted December 12, 2017 Group.getByName() used to not return if the group was dead, but either it was changed as a feature or a bug. Either way I've been using this overloaded function to check if it is dead. local function groupIsDead(groupName) -- a certain bug hasn't been fixed, so I have to use this instead. if (Group.getByName(groupName) and Group.getByName(groupName):isExist() == false) or (Group.getByName(groupName) and #Group.getByName(groupName):getUnits() < 1) or not Group.getByName(groupName) then return true end return false end The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum Link to comment Share on other sites More sharing options...
tn_prvteye Posted December 12, 2017 Author Share Posted December 12, 2017 (edited) Thanks for the tips, I'll see what I can do. After the 2.5 merge, I REALLY hope they look at Missions and the ME. There are coders out there doing absolute magic with what they've been given to work with. The capability for much more exists, but it shouldn't be this damned confusing. Edited December 12, 2017 by tn_prvteye Spelling errors, not enough coffee Link to comment Share on other sites More sharing options...
Recommended Posts