OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: seanver on 05 Sep 2002, 14:20:08

Title: Cheking if the units of a group are dead without having to put a not alive...
Post 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.
Title: Re:Cheking if the units of a group are dead without having to put a not alive...
Post by: Black_Feather on 05 Sep 2002, 14:54:55
use one of the count commands

count units player <3
Title: Re:Cheking if the units of a group are dead without having to put a not alive...
Post by: seanver on 05 Sep 2002, 15:13:18
Where "player" do you mean the name of a player of a group, the leader of the group?
Title: Re:Cheking if the units of a group are dead without having to put a not alive...
Post by: CrashnBurn on 05 Sep 2002, 16:34:11
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"
;-----------------------------------------------------


Title: Re:Cheking if the units of a group are dead without having to put a not alive...
Post by: seanver on 05 Sep 2002, 16:41:06
thx