IAF.AssafB Posted September 29, 2016 Posted September 29, 2016 Hi, In a mission I'm bulding, I use mist.cloneInZone to spawn a group of tanks randomally inside a zone. I'd like to have a message displayed to the players if/when a few of the tanks in the group (i.e. 50%) have been destroyed during the mission. I know I can't use the simple "GROUP ALIVE LESS THAN" trigger, since the group is dynamically spawned rather than an "original" editor group. Also tried using the mist.flagFunc.units_in_zones to check the group and once its designated flag goes "false" - trigger the message. But this also doesn't seem to work. Can anyone point me to a simple solution? (I'm still on a very basic level of experience when it comes to scripts....) Thanks ! Assaf.
Grimes Posted September 30, 2016 Posted September 30, 2016 That flagFunc should work because its designed to update the units it checks when new units get spawned. Can you post the mission you tried it with or at least post the code you used and describe the order it works in? 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
IAF.AssafB Posted September 30, 2016 Author Posted September 30, 2016 That flagFunc should work because its designed to update the units it checks when new units get spawned. Can you post the mission you tried it with or at least post the code you used and describe the order it works in? Thanks Grimes, Attaching the test I've made for this issue. Group 'TestGroup1' is cloned in the zone 'SpawnZone' mist.flagFunc.units_in_zones is checking the zone 'DetectZone' and should activate flag-1 once all four trucks are destroyed -> display the message. I think I've found what my mistake was: In the "units" line at mist.flagFunc.units_in_zones I've originally included the group's original name '[g]TestGroup1' . I realize that since this name isn't maintained for the cloned group, it was not identified by the function and so the flag (1) was not affected - either by the group appearing inside the "DetectZone" or when it was destroyed. Once I've changed the units line to '[red]' , all seems to work OK (however this solution is preventing me from distinguishing specific red groups... Thanks, Assaf.Clone test v1.miz
ESAc_matador Posted September 30, 2016 Posted September 30, 2016 You can specify [red][infantry] or [vehicles] it may help
IAF.AssafB Posted October 2, 2016 Author Posted October 2, 2016 You can specify [red][infantry] or [vehicles] it may help Thanks! Assaf.
Recommended Posts