Jump to content

mist.respawnGroup scripts not working on ground units?


Go to solution Solved by Grimes,

Recommended Posts

Posted

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. 

Posted

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. 

Posted
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
Posted

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. 

  • Thanks 2

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted (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 by Arktos
  • Recently Browsing   0 members

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