Victory / Defeat Triggers

Craigimus

New Member
Reaction score
0
Hey ive made victory and defeat triggers but when i play my map with others there was a message that kept poping up saying player 4 defeated ill post the 2 triggers and if anyone can let me know what i ned to change to make them work.

its a tower defence and the food is the lives i want it so once it hits zero you lose

and the victory is after you finish killing the units in the last level im pretty sure the victory works but im not sure just want it checked anyway.

the victory trigger is turned on when the last level starts and most of the creeps are out.

the defeat trigger is on all the time so maybe thats the problem with the defeat.

Thank you in advance.


Code:
Defeated
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 1 (Red) Food used) Equal to 0
            Then - Actions
                Game - Defeat Player 1 (Red) with the message: Loser you suck.
                Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Actions)
                    Loop - Actions
                        Unit - Kill (Picked unit)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 2 (Blue) Food used) Equal to 0
            Then - Actions
                Game - Defeat Player 2 (Blue) with the message: Loser you suck.
                Unit Group - Pick every unit in (Units owned by Player 2 (Blue)) and do (Actions)
                    Loop - Actions
                        Unit - Kill (Picked unit)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 3 (Teal) Food used) Equal to 0
            Then - Actions
                Game - Defeat Player 3 (Teal) with the message: Loser you suck.
                Unit Group - Pick every unit in (Units owned by Player 3 (Teal)) and do (Actions)
                    Loop - Actions
                        Unit - Kill (Picked unit)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 4 (Purple) Food used) Equal to 0
            Then - Actions
                Game - Defeat Player 4 (Purple) with the message: Loser you suck.
                Unit Group - Pick every unit in (Units owned by Player 4 (Purple)) and do (Actions)
                    Loop - Actions
                        Unit - Kill (Picked unit)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 5 (Yellow) Food used) Equal to 0
            Then - Actions
                Game - Defeat Player 5 (Yellow) with the message: Loser you suck.
                Unit Group - Pick every unit in (Units owned by Player 5 (Yellow)) and do (Actions)
                    Loop - Actions
                        Unit - Kill (Picked unit)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 6 (Orange) Food used) Equal to 0
            Then - Actions
                Game - Defeat Player 6 (Orange) with the message: Loser you suck.
                Unit Group - Pick every unit in (Units owned by Player 6 (Orange)) and do (Actions)
                    Loop - Actions
                        Unit - Kill (Picked unit)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 7 (Green) Food used) Equal to 0
            Then - Actions
                Game - Defeat Player 7 (Green) with the message: Loser you suck.
                Unit Group - Pick every unit in (Units owned by Player 7 (Green)) and do (Actions)
                    Loop - Actions
                        Unit - Kill (Picked unit)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 8 (Pink) Food used) Equal to 0
            Then - Actions
                Game - Defeat Player 8 (Pink) with the message: Loser you suck.
                Unit Group - Pick every unit in (Units owned by Player 8 (Pink)) and do (Actions)
                    Loop - Actions
                        Unit - Kill (Picked unit)
            Else - Actions

Code:
Victory
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in (Units in VictoryRed <gen> owned by Player 12 (Brown))) Equal to 0
            Then - Actions
                Game - Victory Player 1 (Red) (Show dialogs, Show scores)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in (Units in VictoryBlue <gen> owned by Player 12 (Brown))) Equal to 0
            Then - Actions
                Game - Victory Player 2 (Blue) (Show dialogs, Show scores)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in (Units in VictoryTeal <gen> owned by Player 12 (Brown))) Equal to 0
            Then - Actions
                Game - Victory Player 3 (Teal) (Show dialogs, Show scores)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in (Units in VictoryPurp <gen> owned by Player 12 (Brown))) Equal to 0
            Then - Actions
                Game - Victory Player 4 (Purple) (Show dialogs, Show scores)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in (Units in VictoryYellow <gen> owned by Player 12 (Brown))) Equal to 0
            Then - Actions
                Game - Victory Player 5 (Yellow) (Show dialogs, Show scores)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in (Units in VictoryOJ <gen> owned by Player 12 (Brown))) Equal to 0
            Then - Actions
                Game - Victory Player 6 (Orange) (Show dialogs, Show scores)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in (Units in VictoryGreen <gen> owned by Player 12 (Brown))) Equal to 0
            Then - Actions
                Game - Victory Player 7 (Green) (Show dialogs, Show scores)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in (Units in VictoryPink <gen> owned by Player 12 (Brown))) Equal to 0
            Then - Actions
                Game - Victory Player 8 (Pink) (Show dialogs, Show scores)
            Else - Actions
 

Ancient-wolf

New Member
Reaction score
22
instead of Time - Every 1.00 seconds of game time i suggest you make a trigger

Code:
Event - Player 1 (red)s current food cap becomes lesser then or equal to 0
condition
Action - Turn On Defeat

you will have to make one for every player but i think it'll work
and you dont need the Loop either
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top