OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: seanver on 05 Sep 2002, 14:20:08
-
Cheking if the units of a group are dead without having to put a not alive... condition for each unit of the group.
-
use one of the count commands
count units player <3
-
Where "player" do you mean the name of a player of a group, the leader of the group?
-
You can use the group name to check if all members of a group are dead. In this example, alldead can be the condition of a trigger in your map for something that happens. Substitute Alpha with the groupname you're using.
;-----------------------------------------------------
#loop
? NOT(alive player) : exit
?(("Alive _x" count units Alpha) == 0): alldead=true; exit
~2
goto "loop"
;-----------------------------------------------------
-
thx