• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

GUI: Problem with winning TEAM showing up

Status
Not open for further replies.
Level 4
Joined
Aug 9, 2012
Messages
84
I need someone to help me fix this:

  • Victory Update 5 v 5
    • Events
      • Unit - A unit Dies
    • Conditions
      • (((Owner of (Triggering unit)) controller) Equal to User) and (((Triggering unit) is A Hero) Equal to True)
    • Actions
      • Set Player_Kills[(Player number of (Owner of (Killing unit)))] = (Player_Kills[(Player number of (Owner of (Killing unit)))] + 1)
      • Set Player_Deaths[(Player number of (Owner of (Triggering unit)))] = (Player_Deaths[(Player number of (Owner of (Triggering unit)))] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Triggering unit)) is an ally of Player 1 (Red)) Equal to True
        • Then - Actions
          • Set Force1_Deaths = (Force1_Deaths + 1)
          • Set Force2_Kills = (Force2_Kills + 1)
          • Multiboard - Set the text for Multiboard_5v5 item in column 3, row 2 to (String(Force1_Deaths))
          • Multiboard - Set the text for Multiboard_5v5 item in column 2, row 3 to (String(Force2_Kills))
        • Else - Actions
          • Set Force2_Deaths = (Force2_Deaths + 1)
          • Set Force1_Kills = (Force1_Kills + 1)
          • Multiboard - Set the text for Multiboard_5v5 item in column 3, row 3 to (String(Force2_Deaths))
          • Multiboard - Set the text for Multiboard_5v5 item in column 2, row 2 to (String(Force1_Kills))
      • Set Temp_String = (|cffff00005|r |cffFFFFFFvs |cff3C7AFF5|r - |cffffdeadOP|r - Win at |cff82e776 + ((String(Win_Points_Cap)) + ( Kills|r - ( |cffFF1D1D + ((String(Force1_Kills)) + (|r ) / ( |cff3C7AFF + ((String(Force2_Kills)) + |r )))))))
      • Multiboard - Change the title of Multiboard_5v5 to Temp_String
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Killing unit)) controller) Equal to User
          • ((Owner of (Killing unit)) slot status) Equal to Is playing
        • Then - Actions
          • Multiboard - Set the text for Multiboard_5v5 item in column 2, row Multiboard_Spots[(Player number of (Owner of (Killing unit)))] to (Color[(Player number of (Owner of (Killing unit)))] + ((String(Player_Kills[(Player number of (Owner of (Killing unit)))])) + |r))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Triggering unit)) controller) Equal to User
          • ((Owner of (Triggering unit)) slot status) Equal to Is playing
        • Then - Actions
          • Multiboard - Set the text for Multiboard_5v5 item in column 3, row Multiboard_Spots[(Player number of (Owner of (Triggering unit)))] to (Color[(Player number of (Owner of (Triggering unit)))] + ((String(Player_Deaths[(Player number of (Owner of (Triggering unit)))])) + |r))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • Player_Kills[(Player number of (Owner of (Killing unit)))] Greater than or equal to Win_Points_Cap
        • Then - Actions
          • Set Force1 = (All allies of Player 1 (Red))
          • Set Force2 = (All allies of Player 6 (Orange))
          • Set Player_Wins[(Integer A)] = (Owner of (Killing unit))
          • Trigger - Turn off Coin Earned <gen>
          • Trigger - Turn off Observing Players <gen>
          • Trigger - Run Dialog Box <gen> (ignoring conditions)
          • Multiboard - Destroy Multiboard_5v5
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player_Wins[(Player number of (Triggering player))] is an ally of Player 1 (Red)) Equal to True
            • Then - Actions
              • Player Group - Pick every player in Force1 and do (Actions)
                • Loop - Actions
              • Game - Display to (All players) for 15.00 seconds the text: The |cffFF1D1DWEST|...
              • Game - Display to (All players) for 15.00 seconds the text:
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Player_Wins[(Player number of (Triggering player))] is an ally of Player 6 (Orange)) Equal to True
                • Then - Actions
                  • Player Group - Pick every player in Force2 and do (Actions)
                    • Loop - Actions
                  • Game - Display to (All players) for 15.00 seconds the text: The |cff3C7AFFEAST|...
                  • Game - Display to (All players) for 15.00 seconds the text:
                • Else - Actions
        • Else - Actions
What I want done is IF Player_Kills is equal to or greater than Win_Points_Cap THEN whoever is an ally of Player 1 Red or Player 6 Orange, it gives a game message saying, "The West Team (Red's Team, 5 players) or The East Team (Orange's Team, 5 players) has won the game!"

But it doesn't do that at all. I don't know if I have my GUI out of order or what, but I need someone to help me arrange it so it is in proper order.

Everything else works just fine BEFORE the condition IF player_kills equal to or greater than Win_Points_Cap

Thank You to whoever helps.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
easiest way i could think of doing this is when u select ur teams. to but them into a player group the players in The West Team add to westTeamPlayerG. Teh ones in The East Team add to eastTeamPlayerG. Then when one wins check to see which player group that player is in and display the text to players in that player group.

also i know ive told u this b4 but anything u use more than twice use a variable and use that.
 
Level 4
Joined
Aug 9, 2012
Messages
84
easiest way i could think of doing this is when u select ur teams. to but them into a player group the players in The West Team add to westTeamPlayerG. Teh ones in The East Team add to eastTeamPlayerG. Then when one wins check to see which player group that player is in and display the text to players in that player group.

also i know ive told u this b4 but anything u use more than twice use a variable and use that.

That's what I did, here. I did relate who is in the Group to a variable, All allies of Player 1 Red, etc.:

  • Then - Actions
    • Set Force1 = (All allies of Player 1 (Red))
    • Set Force2 = (All allies of Player 6 (Orange))
    • Set Player_Wins[(Integer A)] = (Owner of (Killing unit))
    • Trigger - Turn off Coin Earned <gen>
    • Trigger - Turn off Observing Players <gen>
    • Trigger - Run Dialog Box <gen> (ignoring conditions)
    • Multiboard - Destroy Multiboard_5v5
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Player_Wins[(Player number of (Triggering player))] is an ally of Player 1 (Red)) Equal to True
      • Then - Actions
        • Player Group - Pick every player in Force1 and do (Actions)
          • Loop - Actions
        • Game - Display to (All players) for 15.00 seconds the text: The |cffFF1D1DWEST|...
        • Game - Display to (All players) for 15.00 seconds the text:
      • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Player_Wins[(Player number of (Triggering player))] is an ally of Player 6 (Orange)) Equal to True
          • Then - Actions
            • Player Group - Pick every player in Force2 and do (Actions)
              • Loop - Actions
            • Game - Display to (All players) for 15.00 seconds the text: The |cff3C7AFFEAST|...
            • Game - Display to (All players) for 15.00 seconds the text:
          • Else - Actions
    • Else - Actions[/hidden]
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
u are displaying to the player group all players. right here
  • Game - Display to (All players) for 15.00 seconds the text: The |cffFF1D1DWEST|...
  • Game - Display to (All players) for 15.00 seconds the text:
u can get rid of the player group loop. also ur actions arent in the loop.
display text to everyone in Force1 not to the player group all players.
 
Status
Not open for further replies.
Top