HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger problem

03-02-2003, 10:21 AM#1
Malganis
Hey

I am trying to do so when all the buildings are dead a cinematic begins. but it won´t work. The trigger lookes like this:


1.
-EVENT-
Unit - A unit owned by player X DIES

-CONDITION-
((Triggering unit) is A structure) Equal to True
(Number of units in (Units in (Playable map area))) equal to 0

-Action-
(Cinematic stuff)


Thanks:D
03-02-2003, 06:47 PM#2
Guest
Units are still around even after they are dead. You would need to remove the units in playable area condition and replace the cinimatic actions with the following...
Code:
Remove dying unit from game

If (Number of units in (Units owned by Player X matching ((Matching unit) is A structure) Equal to True))) not equal to 0 then DoNothing() else execute Cinematics trigger.
Then have your cinematics trigger have all you cinematics for it. Keep in mind that this requires a seperate trigger for each player X.
03-02-2003, 06:49 PM#3
Guest
Wait. I take the remove from game part back...just have an AND statement for the match instead with the second condition being...
Code:
(Matching Unit) is dead
03-02-2003, 06:59 PM#4
rwxr-xr-x
I originaly posted in the other one because it was the only thread at the time, so I'm switching my response to here. It is quoted below.

Also, in regards to checking for units in a region, dead units, or units that are hidden using the Unit - Hide action, are not picked for selection, so removing them is not necessary for the purposes of this check.

Quote:
The problem with your if statement is that it is requiring that no units be in the region. A grunt, a creep, a hero, etc. are all considered units, so if they exist, your trigger will fail to meet the conditions.

Simply change your second condition to use the Units in Region Matching Condition so that it looks like the following:

(Number of units in (Units in (Playable map area) matching (((Matching unit) is A structure) Equal to True))) Equal to 0

This will then count the number of units in the map that are structures, and elleviate the problem of having heros and other various units preventing the trigger from executing.
03-02-2003, 08:59 PM#5
Malganis
Hmm the problem was that the trigger became active almost when you started the map.
Can you solve this?

Thanks:D
03-02-2003, 09:16 PM#6
rwxr-xr-x
Did something die? If your event is when a unit dies, then it shouldn't run until then.

Also, are there buildings on the map already, or do players have to build them from the start?
03-03-2003, 05:28 PM#7
Malganis
Yes there is buildings on the map, so they don´t need to build any. And the wierd thing is that something didn´t die.

Hmm, got any ideas?

Thanks:D
03-03-2003, 06:22 PM#8
Guest
Try using a periodic event instead of unit dies...make it like 3 seconds.