L.Trale 10 Posted October 6, 2013 I want it so that when the group is killed, it will execute a new script. Here is the script: sleep 5; playsound "Start"; hint "Be advised Enemy Infantry spotted in your area"; GroupOne_X = Creategroup EAST; "O_diver_F" createUnit [getMarkerPos "spawn1",GroupOne_X,"GroupOne_X move position player",random 1, "Private"]; "O_diver_F" createUnit [getMarkerPos "spawn2",GroupOne_X,"GroupOne_X move position player",random 1, "Private"]; Thanks Share this post Link to post Share on other sites
cobra4v320 27 Posted October 6, 2013 Go to google type in check if group is dead. Search before posting. { alive _x } count units _grp == 0 Share this post Link to post Share on other sites
L.Trale 10 Posted October 6, 2013 Thanks, I did search but I didn't understand it. ---------- Post added at 20:29 ---------- Previous post was at 20:16 ---------- Any way to make it "If { alive _x } count units _grp == 0 "then" execVM "Waves\Wave2.sqf"; Share this post Link to post Share on other sites
shuko 59 Posted October 6, 2013 if ({alive _x} count units GroupOne_X < 1) then { [] execvm "Waves\Wave2.sqf"; }; Share this post Link to post Share on other sites
L.Trale 10 Posted October 6, 2013 Thanks, but it doesn't seem to be working. Share this post Link to post Share on other sites
cobra4v320 27 Posted October 6, 2013 If you are doing it in a trigger: condition: { alive _x } count units grpName == 0 on activation: 0 = [] execVM "Waves\Wave2.sqf" grpName is the name of your group, so in the init of your groups leader you should have grpName = group this; or whatever name you want. Share this post Link to post Share on other sites
L.Trale 10 Posted October 6, 2013 I'm executing it from a script, not a trigger. ---------- Post added at 20:54 ---------- Previous post was at 20:46 ---------- Maybe use the "waitUntil" command? Share this post Link to post Share on other sites
cobra4v320 27 Posted October 6, 2013 waitUntil will work. Share this post Link to post Share on other sites
HazJ 1288 Posted October 6, 2013 if (({alive _x} count units groupname) < 1) then {nul = [] execVM "Waves\Wave2.sqf";); Dirty Haz Share this post Link to post Share on other sites
L.Trale 10 Posted October 6, 2013 Not working, thanks though. waitUntil {{ alive _x } count units _grp == 0; execVM "Waves\Wave2.sqf"; ;} This works, but for some reason it doesn't count the dead units in the group. If I kill just one of them, it preforms the action. Share this post Link to post Share on other sites
HazJ 1288 Posted October 6, 2013 (edited) waitUntil {({alive _x} count units groupname) < 1;}; nul = [] execVM "Waves\Wave2.sqf"; Dirty Haz Edit/Update: Make sure you replace "groupname" with the actual group's name. :) EXAMPLE MISSION. Dirty Haz Edited October 6, 2013 by Dirty Haz Edit/Update Share this post Link to post Share on other sites
HazJ 1288 Posted October 6, 2013 No problem, glad you got it working! :) Dirty Haz Share this post Link to post Share on other sites