Home   Help Search Login Register  

Author Topic: Cheking if the units of a group are dead without having to put a not alive...  (Read 1161 times)

0 Members and 1 Guest are viewing this topic.

seanver

  • Guest
Cheking if the units of a group are dead without having to put a not alive... condition for each unit of the group.

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
use one of the count commands

count units player <3

seanver

  • Guest
Where "player" do you mean the name of a player of a group, the leader of the group?

CrashnBurn

  • Guest
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"
;-----------------------------------------------------



seanver

  • Guest