• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Victory/Defeat Gui Trigger Request

Status
Not open for further replies.
Level 30
Joined
Mar 14, 2014
Messages
1,215
Hello Friends,

as you can guess: I need a customazible Victory/Defeat Gui trigger. This is because i currently make a multiple races map.

It goes like this:
You choose Human as your Race indicator:
Once ingame you can now choose:

-Human-
(Normal Human)
-Scarlet Crusade-
-Dreanei-
-Blood elf-
-Worgen-

Once choosen you play as this race.
But now there is a problem:

victory-defeat-png.261873


This is used for normal gameplay. But it is doesn't work properly for Custom Races.

I am sure you know what i mean. ('Getting visible, because i don't have a Townhall' after a while)
 
  • Defeat P1
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
      • (Count structures controlled by Player 1 (Red) (Exclude incomplete structures)) Equal to 0
    • Actions
      • Game - Defeat Player 1 (Red) with the message: Defeat!
      • Set No_of_Players = (No_of_Players - 1)
  • Victory
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
      • No_of_Players Equal to 1
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • P1_Defeated Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • P2_Defeated Equal to True
            • Then - Actions
            • Else - Actions
              • Game - Victory Player 2 (Blue) (Show dialogs, Show scores)
        • Else - Actions
          • Game - Victory Player 1 (Red) (Show dialogs, Show scores)
Set No_of_Players to the number of players for your map and repeat the Pn_Defeated for every player if it was six you'd have P1_Defeated up to P6_Defeated with the above trigger.
 
Last edited:
Level 30
Joined
Mar 14, 2014
Messages
1,215
  • Defeat P1
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
      • (Count structures controlled by Player 1 (Red) (Exclude incomplete structures)) Equal to 0
    • Actions
      • Game - Defeat Player 1 (Red) with the message: Defeat!
      • Set No_of_Players = (No_of_Players - 1)
  • Victory
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
      • No_of_Players Equal to 1
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • P1_Defeated Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • P2_Defeated Equal to True
            • Then - Actions
            • Else - Actions
              • Game - Victory Player 2 (Blue) (Show dialogs, Show scores)
        • Else - Actions
          • Game - Victory Player 1 (Red) (Show dialogs, Show scores)
Set No_of_Players to the number of players for your map and repeat the Pn_Defeated for every player if it was six you'd have P1_Defeated up to P6_Defeated with the above trigger.

Ok. Thank you.

One Question: Does the Trigger above also function with Loop action?
 
Okay thanks.

Now about the Victory trigger. Does it function with teams? For Example 2 vs 2.

If i am correct then the Trigger only activates then there's only one player left.

Nah it would only function with FFA, creating it for teams would be more complex.
 
Status
Not open for further replies.
Top