• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Victory Trigger Problem

Status
Not open for further replies.
Level 3
Joined
Apr 27, 2005
Messages
28
Here my trigger for victory of force one...


Code:
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?
 
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
 
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...
 
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.
 
titan_06 said:
ok, 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
 
Status
Not open for further replies.
Back
Top