Arktos Posted March 29, 2024 Posted March 29, 2024 Hi all - My friends and I took a little break from DCS for a bit, and played again last night. I have some pretty decent scripted mission events running that rely on the 'mist.respawnGroup' script, and have worked for, well, ever. I'm assuming since one of the latest patches this script now does not work for ground unit respawns? My air units work just fine, and will respawn just like they did 6 months ago. No errors indicated in the log file, just no respawn. To be clear, I am setting a mission flag ON on a group dead trigger condition. My respawn trigger condition is flag ON, and time since flag. my actions are DO SCRIPT below, and turn the flag OFF. I also have a MESSAGE TO ALL debug message "debug_GROUPNAMErespawn" that IS working, so the conditions are being met to trigger the script, the script just isn't working like it did before. Methodology on aircraft respawns is identical, and IS working. if not Group.getByName('GROUPNAME') then mist.respawnGroup('GROUPNAME', true) end Any thoughts on this? I can't speak highly enough of the effectiveness of the MIST scripting tool, and it's given my friends and me tons of ability to generate some really fun missions to jump into for a few hours at a time, I'd love to get these back up and running.
toutenglisse Posted March 31, 2024 Posted March 31, 2024 On 3/30/2024 at 12:03 AM, Arktos said: ...Any thoughts on this?... Hi, you should use instead this function : MIST groupIsDead - DCS World Wiki - Hoggitworld.com Because Group.getByName() can still return Group Object for a dead group.
Arktos Posted April 3, 2024 Author Posted April 3, 2024 hi @toutenglisse-- thanks for the reply. I have tried this with: if mist.groupIsDead('GROUP') == true then mist.respawnGroup('GROUP', true) end To make things very simple, I've made a mission that has 1 tank spawn ten seconds in (called GROUP), after MIST loads, and gets killed by 3 other tanks. I've also added env.info("respawn") in the script to trigger a dcs.log INFO entry (at the suggestion of mrSkortch), and that is working within the script, as well. But still no respawn. I've even tried it as a repetitive action, and still no respawn. Any other thoughts? I really don't want to change the scripting over to MOOSE as others have suggested, I like how mist works with other functions, and it would be a ton of work.
toutenglisse Posted April 3, 2024 Posted April 3, 2024 4 hours ago, Arktos said: ...Any other thoughts?... I've just tried "sample test" using your description. I don't know why but both "if not Group.getByName('GROUP') then" and "if mist.groupIsDead('GROUP') == true then" return unexpected data. It does work with : local gp = Group.getByName('GROUP') if gp and gp:isExist() == true and #gp:getUnits() > 0 and gp:getUnit(1):isActive() then else mist.respawnGroup('GROUP', true) end
Solution Grimes Posted April 3, 2024 Solution Posted April 3, 2024 The old bug of Group.getByName returning dead groups is back in addition to isExist() also returning true on the dead group. I updated mist to adjust for this bug. 2 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
Arktos Posted April 4, 2024 Author Posted April 4, 2024 (edited) @Grimes I was having this conversation with MrSkortch (unless you're the same person) in Github, all of my mission respawns now work with MIST 4.5.126. Thanks so much for the help, excited to get back into the mission with friends! MIST is awesome, by the way, thanks for the hard work to develop it. Edited April 4, 2024 by Arktos
Grimes Posted April 4, 2024 Posted April 4, 2024 Yes that is me. 1 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
Recommended Posts