HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Condition check....No units in region?

08-29-2003, 04:37 PM#1
Uratoh
I need a trigger that will only activate if a specific player controls no units in a region...what's the best way to do this?
08-29-2003, 05:16 PM#2
Panto
Code:
Set [b]integerPants[/b]=0
Pick Every Unit in Region [b]Iforgottobrushmyteeth[/b] and do If picked unit is owned by Player 1, Set [b]integerPants[/b] = [b]integerPants[/b]+1
If [b]integerPants[/b]=0, then [b]compliment Drax on his hair[/b].
where Iforgottobrushmyteeth is your region, integerPants is an integer variable, and compliment Drax on his hair is the rest of the trigger that you want to run.
08-29-2003, 05:21 PM#3
Shvegait
Integer Comparison:

Number of Units in Unit Group: Units owned by Player <blah> in Region <blah> Equal to 0
08-30-2003, 06:05 AM#4
Uratoh
ok...neither of these seem to take into account i dont wanna pick DEAD units in it...it seems to count them too...I just wanna count the living ones!
08-30-2003, 08:49 AM#5
Krakou
Add to Panto's trigger a matching condition:

Unit Group - Pick every unit in (Units in (Iforgottobrushmyteeth) matching (((Matching unit) is alive) Equal to True)) and do...