HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

When all structures have been destroyed.

06-26-2006, 05:01 PM#1
Sardius
Been trying to figure out this condition but I've not had luck... I want a trigger that when a certain player has all their buildings destroyed, that it activates another trigger.
06-26-2006, 05:19 PM#2
Alevice
Simplest way I can think of:

Trigger:
Melee Initialization
Collapse Events
Time - Every 1.00 seconds of game time
Collapse Conditions
(Number of units in (Units owned by Player 1 (Red) matching (((Matching unit) is A structure) Equal to True))) Equal to 0
Collapse Actions
Trigger - Run MyTrigger (checking conditions)
06-26-2006, 05:22 PM#3
evilmapcreater
Trigger:
all buildings destroyed
Collapse Events
Time - Every 1.00 seconds of game time
Conditions
Collapse Actions
Set numberofbuildings = (Number of units in (Units owned by Player 1 (Red) matching (((Triggering unit) is A structure) Equal to True)))
If ((Number of units in (Units in (Playable map area))) Equal to 0) then do (Trigger - Run THE TRIGGER <gen> (checking conditions)) else do (Do nothing)

you can make a varible and do it like this
06-26-2006, 06:40 PM#4
The)TideHunter(
Both your triggers leak a group every second, that will get slow after a while.

Use:
Trigger:
Number of Buildings
Collapse Events
Unit - A unit Dies
Time - Every 2.50 seconds of game time
Conditions
Collapse Actions
Collapse For each (Integer A) from 1 to 12, do (Actions)
Collapse Loop - Actions
Set TempGroup = (Units owned by (Player((Integer A))) matching (((Matching unit) is A structure) Equal to True))
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Number of units in TempGroup) Equal to 0
Collapse Then - Actions
Trigger - Run 'Your Trigger' <gen> (checking conditions)
Else - Actions
Custom script: call DestroyGroup(udg_TempGroup)
06-27-2006, 03:08 AM#5
harshateja
I am probably missing something significant but why use timed events at all?
You wuold be better off just using the A Unit Dies event. Much more effective.
06-27-2006, 05:20 AM#6
Sardius
Well I tried this one, it didn't seem to work though.

Event:
Time - Every 3.00 seconds of game time

Condition:
(Savage Warlord 0701 <gen> is dead) Equal to True
(Thrack 0160 <gen> is dead) Equal to True
(Number of units in (Units owned by Player 6 (Orange) matching (((Matching unit) is A structure) Equal to True))) Equal to 0

Action:
Run my trigger.

All conditions are met, but my following trigger doesn't activate, and for the record the trigger its suppose to activate works fine.