Warcraft III resources & community, 2003–2006 · archived

Victory Trigger Problem

7 posts
#1

Victory Trigger Problem

Here my trigger for victory of force one...


Force1
    Events
        Unit - A unit owned by Player 5 (Yellow) Dies
        Unit - A unit owned by Player 6 (Orange) Dies
        Unit - A unit owned by Player 7 (Green) Dies
        Unit - A unit owned by Player 9 (Gray) Dies
    Conditions
        ((Triggering player) is an ally of Player 5 (Yellow)) Equal to True
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in (Units in (Playable map area) owned by (Matching player))) Equal to 0
            Then - Actions
                Game - Victory Player 1 (Red) (Show dialogs, Show scores)
                Game - Victory Player 2 (Blue) (Show dialogs, Show scores)
                Game - Victory Player 3 (Teal) (Show dialogs, Show scores)
                Game - Victory Player 4 (Purple) (Show dialogs, Show scores)
            Else - Actions




Problem is as soon as 1 builing of an opponents dies your force wins.... I thought that it looked right... anyone see what wrong with it?
#2
make a generic unit event, to make the trigger shorter. also, do if owner of unit = to ally of player
and unit type = the building
#3
I dont think you getting what my trigger is...

I want the trigger to be so that force on achives vicort when force 2 has no units/builings left...
#4
ok, make a timer event then. like every x seconds.

edit: i think matching player, ive never used it, but i know triggering player works. it would replace it becuase its the triggering player that the event is happening to. so you would need the timer event, just change matching to triggering.

also, you can still change to generic unit event, and do make sure the owner of triggering player = ally of player 5. then, instead of triggering player, its owner of triggering unit.

however, for the quick fix, just change to triggering player.
#5
Thank you it works now :P
#6

lol

i just figured you had more questions, so i searched for your topics. didnt read the dates tho.
#7
titan_06ok, make a timer event then. like every x seconds.


imo turning a trigger into a 'periodic event' that doesn't need to be is a bad practice
you should learn to use event handling more

of course, not saying that you have to turn it back or anything, just something to think about for the future