Kholsaet Posted February 22, 2015 Posted February 22, 2015 I've posted a mission below... read the manual... and at this point tried everything I can think of to make this work, but I cant seem to get the flag to come on. Here is the Do Script I'm using -- (keeping it simple for brevity's sake) mist.flagFunc.group_dead {groupName ='Cowboy', flag =1} The function doesn't puke, but as you'll see from the attached mission, Flag 1 never goes from false (0) to true (1). I'm guessing I'm doing something wrong... can anyone help? Much Appreciated!Test.miz
NakedSquirrel Posted February 22, 2015 Posted February 22, 2015 I use the group.getbyname function, which seems to work well. if not Group.getByName("GROUP_TO_BE_KILLED") then return true end Reference mission: http://forums.eagle.ru/showthread.php?t=138754 1 Modules: A10C, AV8, M2000C, AJS-37, MiG-21, MiG-19, MiG-15, F86F, F5E, F14A/B, F16C, F18C, P51, P47, Spitfire IX, Bf109K, Fw190-D, UH-1, Ka-50, SA342 Gazelle, Mi8, Christian Eagle II, CA, FC3
Kholsaet Posted February 22, 2015 Author Posted February 22, 2015 Thanks - Ill give this a try and let you know how it works out. I'd still like to know if the mist.FlagFunction is bugged, or if it is something Im doing incorrectly. Cheers!
Kholsaet Posted February 22, 2015 Author Posted February 22, 2015 Ok - Figured it Out Thanks for the help - Turns out that "dead" does not mean destroyed, but rather "deactivated", as in removed from the mission environment altogether. You're solution works exactly the same way as the MIST script. I ran the mission posted previously except I added a group deactivate line at 10 min - long after the AI aircraft had a chance to destroy the ground units. The flag didn't become true until exactly 10 min. I haven't tested to see if this behavior is different for air units. Perhaps they are automatically deactivated once they are destroyed. Something to test I suppose. So in essence the problem was my fundamental misunderstanding of what the function did. Thanks for the help though.
Kholsaet Posted February 22, 2015 Author Posted February 22, 2015 yup- Checked this for air units -- Turns out Air units must be deactivated once they are destroyed in the ME
Grimes Posted February 22, 2015 Posted February 22, 2015 It seems that objects are still accessible after they are destroyed, which is different from what it has been for a while now. Not sure if its a bug or meant to be a feature. Either way I'll modify the functions so it will work. 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
Wrecking Crew Posted February 22, 2015 Posted February 22, 2015 It seems that objects are still accessible after they are destroyed, which is different from what it has been for a while now. Not sure if its a bug or meant to be a feature. Either way I'll modify the functions so it will work. Hmmm, maybe that will help with cleanups. Any change with Deactivated Groups are Dead? (I'm of the opinion that Deactivated should not be the same as Dead.) WC Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.
Wrecking Crew Posted February 22, 2015 Posted February 22, 2015 The reason this has come up for me -- A AI aircraft has to get some place, but if it is destroyed then the mission is compromised. If this a/c is destroyed then an Is Dead Flag will be set to True. Consider that the AI a/c lands and taxis to its parking slot. Twenty or thirty minutes later the a/c is automatically deactivated and that triggers the a/c Is Dead flag which is incorrect. To insure that an a/c has completed its objective I will deactivate it and set a Deactivation Flag that prevents the Is Dead Flag from triggering. WC Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.
Recommended Posts