• 🏆 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!

Problem with Wait Action / wc3stats.com

Status
Not open for further replies.
Level 18
Joined
Mar 16, 2008
Messages
721
Sometimes this trigger doesn't seem to run certain Actions. My only conclusion is that there is some problem caused by the Wait Actions. Any thoughts?

For example, this link goes to logged data uploaded via game replay. Yellow player's losing status is logged by his role, a Knight, is not logged. There are both right next to eachother in actions. So i'm not sure how it can log one but not the other. Unless there is something wrong with the Wait Action or something wrong with the wc3stats.com?


  • log metadata
    • Events
      • Time - MMD_Timer expires
    • Conditions
    • Actions
      • -------- [CODE]~~ --------
      • -------- Player 1 Red --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) is in Losing_Group_Var.) Equal to True
          • (Player 1 (Red) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 1 (Red) slot status) Equal to Has left the game
              • (Player 1 (Red) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(0), "King")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(0), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Game - Defeat Player 1 (Red) with the message: ...
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) is in Winning_Group_Var.) Equal to True
          • (Player 1 (Red) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 1 (Red) slot status) Equal to Has left the game
              • (Player 1 (Red) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(0), "King")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(0), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Game - Victory Player 1 (Red) (Show dialogs, Show scores)
        • Else - Actions
      • -------- [CODE]~~ --------
      • -------- Player 2 Blue --------
      • -------- ~~[/CODE] --------
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 2 (Blue) is in Losing_Group_Var.) Equal to True
          • (Player 2 (Blue) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 2 (Blue) slot status) Equal to Has left the game
              • (Player 2 (Blue) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(1), "King")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(1), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Game - Defeat Player 2 (Blue) with the message: ...
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 2 (Blue) is in Winning_Group_Var.) Equal to True
          • (Player 2 (Blue) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 2 (Blue) slot status) Equal to Has left the game
              • (Player 2 (Blue) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(1), "King")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(1), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Game - Victory Player 2 (Blue) (Show dialogs, Show scores)
        • Else - Actions
      • -------- [CODE]~~ --------
      • -------- Player 3 Teal --------
      • -------- ~~[/CODE] --------
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 3 (Teal) is in Losing_Group_Var.) Equal to True
          • (Player 3 (Teal) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 3 (Teal) slot status) Equal to Has left the game
              • (Player 3 (Teal) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(2), "King")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(2), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Game - Defeat Player 3 (Teal) with the message: ...
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 3 (Teal) is in Winning_Group_Var.) Equal to True
          • (Player 3 (Teal) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 3 (Teal) slot status) Equal to Has left the game
              • (Player 3 (Teal) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(2), "King")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(2), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Game - Victory Player 3 (Teal) (Show dialogs, Show scores)
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 4 Purple --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 4 (Purple) is in Losing_Group_Var.) Equal to True
          • (Player 4 (Purple) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 4 (Purple) slot status) Equal to Has left the game
              • (Player 4 (Purple) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(3), "King")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(3), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Game - Defeat Player 4 (Purple) with the message: ...
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 4 (Purple) is in Winning_Group_Var.) Equal to True
          • (Player 4 (Purple) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 4 (Purple) slot status) Equal to Has left the game
              • (Player 4 (Purple) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(3), "King")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(3), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Game - Victory Player 4 (Purple) (Show dialogs, Show scores)
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 5 Yellow --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 5 (Yellow) is in Losing_Group_Var.) Equal to True
          • (Player 5 (Yellow) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 5 (Yellow) slot status) Equal to Has left the game
              • (Player 5 (Yellow) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(4), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(4), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Game - Defeat Player 5 (Yellow) with the message: ...
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 5 (Yellow) is in Winning_Group_Var.) Equal to True
          • (Player 5 (Yellow) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 5 (Yellow) slot status) Equal to Has left the game
              • (Player 5 (Yellow) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(4), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(4), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Game - Victory Player 5 (Yellow) (Show dialogs, Show scores)
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 6 Orange --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 6 (Orange) is in Losing_Group_Var.) Equal to True
          • (Player 6 (Orange) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 6 (Orange) slot status) Equal to Has left the game
              • (Player 6 (Orange) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(5), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(5), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Game - Defeat Player 6 (Orange) with the message: ...
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 6 (Orange) is in Winning_Group_Var.) Equal to True
          • (Player 6 (Orange) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 6 (Orange) slot status) Not equal to Has left the game
              • (Player 6 (Orange) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(5), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(5), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Game - Victory Player 6 (Orange) (Show dialogs, Show scores)
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 7 Light Green --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 7 (Green) is in Losing_Group_Var.) Equal to True
          • (Player 7 (Green) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 7 (Green) slot status) Equal to Has left the game
              • (Player 7 (Green) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(6), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(6), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Game - Defeat Player 7 (Green) with the message: ...
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 7 (Green) is in Winning_Group_Var.) Equal to True
          • (Player 7 (Green) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 7 (Green) slot status) Equal to Has left the game
              • (Player 7 (Green) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(6), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(6), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Game - Victory Player 7 (Green) (Show dialogs, Show scores)
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 8 Pink --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 8 (Pink) is in Losing_Group_Var.) Equal to True
          • (Player 8 (Pink) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 8 (Pink) slot status) Equal to Has left the game
              • (Player 8 (Pink) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(7), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(7), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Game - Defeat Player 8 (Pink) with the message: ...
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 8 (Pink) is in Winning_Group_Var.) Equal to True
          • (Player 8 (Pink) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 8 (Pink) slot status) Equal to Has left the game
              • (Player 8 (Pink) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(7), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(7), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Game - Victory Player 8 (Pink) (Show dialogs, Show scores)
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 9 Grey --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 9 (Gray) is in Losing_Group_Var.) Equal to True
          • (Player 9 (Gray) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 9 (Gray) slot status) Equal to Has left the game
              • (Player 9 (Gray) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(8), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(8), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Game - Defeat Player 9 (Gray) with the message: ...
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 9 (Gray) is in Winning_Group_Var.) Equal to True
          • (Player 9 (Gray) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 9 (Gray) slot status) Equal to Has left the game
              • (Player 9 (Gray) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(8), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(8), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Game - Victory Player 9 (Gray) (Show dialogs, Show scores)
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 10 Light Blue --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 10 (Light Blue) is in Losing_Group_Var.) Equal to True
          • (Player 10 (Light Blue) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 10 (Light Blue) slot status) Equal to Has left the game
              • (Player 10 (Light Blue) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(9), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(9), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Game - Defeat Player 10 (Light Blue) with the message: ...
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 10 (Light Blue) is in Winning_Group_Var.) Equal to True
          • (Player 10 (Light Blue) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 10 (Light Blue) slot status) Equal to Has left the game
              • (Player 10 (Light Blue) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(9), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(9), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Game - Victory Player 10 (Light Blue) (Show dialogs, Show scores)
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 11 Dark Green --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 11 (Dark Green) is in Losing_Group_Var.) Equal to True
          • (Player 11 (Dark Green) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 11 (Dark Green) slot status) Equal to Has left the game
              • (Player 11 (Dark Green) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(10), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(10), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Game - Defeat Player 11 (Dark Green) with the message: ...
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 11 (Dark Green) is in Winning_Group_Var.) Equal to True
          • (Player 11 (Dark Green) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 11 (Dark Green) slot status) Equal to Has left the game
              • (Player 11 (Dark Green) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(10), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(10), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Game - Victory Player 11 (Dark Green) (Show dialogs, Show scores)
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 12 Brown --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 12 (Brown) is in Losing_Group_Var.) Equal to True
          • (Player 12 (Brown) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 12 (Brown) slot status) Equal to Has left the game
              • (Player 12 (Brown) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(11), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(11), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Game - Defeat Player 12 (Brown) with the message: ...
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 12 (Brown) is in Winning_Group_Var.) Equal to True
          • (Player 12 (Brown) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 12 (Brown) slot status) Equal to Has left the game
              • (Player 12 (Brown) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(11), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(11), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Game - Victory Player 12 (Brown) (Show dialogs, Show scores)
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 17 Wheat --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 17 (Wheat) is in Losing_Group_Var.) Equal to True
          • (Player 17 (Wheat) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 17 (Wheat) slot status) Equal to Has left the game
              • (Player 17 (Wheat) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(16), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(16), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Game - Defeat Player 17 (Wheat) with the message: ...
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 17 (Wheat) is in Winning_Group_Var.) Equal to True
          • (Player 17 (Wheat) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 17 (Wheat) slot status) Equal to Has left the game
              • (Player 17 (Wheat) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(16), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(16), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Game - Victory Player 17 (Wheat) (Show dialogs, Show scores)
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 18 Peach --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 18 (Peach) is in Losing_Group_Var.) Equal to True
          • (Player 18 (Peach) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 18 (Peach) slot status) Equal to Has left the game
              • (Player 18 (Peach) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(17), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(17), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Game - Defeat Player 18 (Peach) with the message: ...
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 18 (Peach) is in Winning_Group_Var.) Equal to True
          • (Player 18 (Peach) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 18 (Peach) slot status) Equal to Has left the game
              • (Player 18 (Peach) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(17), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(17), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Game - Victory Player 18 (Peach) (Show dialogs, Show scores)
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 19 Mint --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 19 (Mint) is in Losing_Group_Var.) Equal to True
          • (Player 19 (Mint) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 19 (Mint) slot status) Equal to Has left the game
              • (Player 19 (Mint) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(18), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(18), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Game - Defeat Player 19 (Mint) with the message: ...
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 19 (Mint) is in Winning_Group_Var.) Equal to True
          • (Player 19 (Mint) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 19 (Mint) slot status) Equal to Has left the game
              • (Player 19 (Mint) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(18), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(18), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Game - Victory Player 19 (Mint) (Show dialogs, Show scores)
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 20 Lavender --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 20 (Lavender) is in Losing_Group_Var.) Equal to True
          • (Player 20 (Lavender) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 20 (Lavender) slot status) Equal to Has left the game
              • (Player 20 (Lavender) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(19), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(19), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Game - Defeat Player 20 (Lavender) with the message: ...
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 20 (Lavender) is in Winning_Group_Var.) Equal to True
          • (Player 20 (Lavender) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 20 (Lavender) slot status) Equal to Has left the game
              • (Player 20 (Lavender) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(19), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(19), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Game - Victory Player 20 (Lavender) (Show dialogs, Show scores)
        • Else - Actions
      • Wait 0.10 seconds
      • Cinematic - Send transmission to Losing_Group_Var from a Neutral Passive.Orb Forger named |cffff0000GAME OVER... at (Center of (Playable map area)): Play No sound and display |cff00ff00Metadata .... Modify duration: Add 38.00 seconds and Wait
      • Cinematic - Send transmission to Winning_Group_Var from a Neutral Passive.Orb Forger named |cff00ff00VICTORY|r at (Center of (Playable map area)): Play No sound and display |cff00ff00Metadata .... Modify duration: Add 38.00 seconds and Wait
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,543
I couldn't resist simplifying your trigger :p
  • log metadata
    • Events
      • Time - MMD_Timer expires
    • Conditions
    • Actions
      • Set VariableSet MMD_PN = (MMD_PN + 1)
      • Set VariableSet MMD_Player = (Player(MMD_PN))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (MMD_Player controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (MMD_Player slot status) Equal to Is playing
              • (MMD_Player slot status) Equal to Has left the game
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (MMD_Player is in Winning_Group_Var) Equal to True
            • Then - Actions
              • -------- Winner: --------
              • Custom script: call MMD_UpdateValueString("mode", udg_MMD_Player, udg_MMD_String[udg_MMD_PN])
              • Wait 0.10 seconds
              • Custom script: call MMD_FlagPlayer (udg_MMD_Player, MMD_FLAG_WINNER)
              • Wait 0.10 seconds
              • Game - Victory MMD_Player (Show dialogs, Show scores)
            • Else - Actions
              • -------- Loser: --------
              • Custom script: call MMD_UpdateValueString("mode", udg_MMD_Player, udg_MMD_String[udg_MMD_PN])
              • Wait 0.10 seconds
              • Custom script: call MMD_FlagPlayer (udg_MMD_Player, MMD_FLAG_LOSER)
              • Wait 0.10 seconds
              • Game - Defeat MMD_Player with the message: Defeat!
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MMD_PN Equal to 12
        • Then - Actions
          • -------- Skip players 13, 14, 15, and 16: --------
          • Set VariableSet MMD_PN = 16
          • Trigger - Run log metadata <gen> (ignoring conditions)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • MMD_PN Equal to 20
            • Then - Actions
              • -------- All players have been logged, finish: --------
              • Cinematic - Send transmission to Losing_Group_Var from a Neutral Passive.Orb Forger named |cffff0000GAME OVER... at (Center of (Playable map area)): Play No sound and display |cff00ff00Metadata .... Modify duration: Add 38.00 seconds and Wait
              • Cinematic - Send transmission to Winning_Group_Var from a Neutral Passive.Orb Forger named |cff00ff00VICTORY|r at (Center of (Playable map area)): Play No sound and display |cff00ff00Metadata .... Modify duration: Add 38.00 seconds and Wait
            • Else - Actions
              • -------- Run for the next player: --------
              • Trigger - Run log metadata <gen> (ignoring conditions)

These strings are used in your UpdateValueString() custom script:
  • Init MMD Strings
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet MMD_String[1] = King
      • Set VariableSet MMD_String[2] = King
      • Set VariableSet MMD_String[3] = King
      • Set VariableSet MMD_String[4] = King
      • Set VariableSet MMD_String[5] = Knight
      • Set VariableSet MMD_String[6] = Knight
      • Set VariableSet MMD_String[7] = Knight
      • Set VariableSet MMD_String[8] = Knight
      • Set VariableSet MMD_String[9] = Knight
      • Set VariableSet MMD_String[10] = Knight
      • Set VariableSet MMD_String[11] = Knight
      • Set VariableSet MMD_String[12] = Knight
      • Set VariableSet MMD_String[17] = Knight
      • Set VariableSet MMD_String[18] = Knight
      • Set VariableSet MMD_String[19] = Knight
      • Set VariableSet MMD_String[20] = Knight
 

Attachments

  • MMD Log Example.w3m
    17.8 KB · Views: 13
Level 18
Joined
Mar 16, 2008
Messages
721
Jeez, Uncle. I need to be paying you. Sincere thanks.

EDIT: well MMD_PN won't always equal 20, sometimes less players will play the game. Perhaps I'll make another integer variable that says the number of players playing that particular game.
 
Last edited:
Level 18
Joined
Mar 16, 2008
Messages
721
I did make a small revision to this trigger, before I saw your elegant revision, based on a guess from Anders, owner of wc3ststs.com, to not show victory/defeat until the trigger is over.

I'm working it into your revision now, but if you have any further tips, it would be appreciated. Thanks again.

  • log metadata
    • Events
      • Time - MMD_Timer expires
    • Conditions
    • Actions
      • Set VariableSet Final_Victory_Status_Red = 2
      • Set VariableSet Final_Victory_Status_Blue = 2
      • Set VariableSet Final_Victory_Status_Teal = 2
      • Set VariableSet Final_Victory_Status_Purp = 2
      • Set VariableSet Final_Victory_Status_Yel = 2
      • Set VariableSet Final_Victory_Status_Oj = 2
      • Set VariableSet Final_Victory_Status_LG = 2
      • Set VariableSet Final_Victory_Status_Pink = 2
      • Set VariableSet Final_Victory_Status_Gray = 2
      • Set VariableSet Final_Victory_Status_LBlue = 2
      • Set VariableSet Final_Victory_Status_DGrn = 2
      • Set VariableSet Final_Victory_Status_Brown = 2
      • Set VariableSet Final_Victory_Status_LBrn = 2
      • Set VariableSet Final_Victory_Status_Peach = 2
      • Set VariableSet Final_Victory_Status_Mint = 2
      • Set VariableSet Final_Victory_Status_LPurp = 2
      • Cinematic - Send transmission to Losing_Group_Var from a Neutral Passive.Orb Forger named |cffff0000GAME OVER... at (Center of (Playable map area)): Play No sound and display Please wait while m.... Modify duration: Add 38.00 seconds and Wait
      • Cinematic - Send transmission to Winning_Group_Var from a Neutral Passive.Orb Forger named |cff00ff00VICTORY|r at (Center of (Playable map area)): Play No sound and display Please wait while m.... Modify duration: Add 38.00 seconds and Wait
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 1 Red --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) is in Losing_Group_Var.) Equal to True
          • (Player 1 (Red) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 1 (Red) slot status) Equal to Has left the game
              • (Player 1 (Red) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(0), "King")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(0), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_Red = 0
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) is in Winning_Group_Var.) Equal to True
          • (Player 1 (Red) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 1 (Red) slot status) Equal to Has left the game
              • (Player 1 (Red) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(0), "King")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(0), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_Red = 1
        • Else - Actions
      • -------- [CODE]~~ --------
      • -------- Player 2 Blue --------
      • -------- ~~[/CODE] --------
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 2 (Blue) is in Losing_Group_Var.) Equal to True
          • (Player 2 (Blue) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 2 (Blue) slot status) Equal to Has left the game
              • (Player 2 (Blue) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(1), "King")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(1), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_Blue = 0
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 2 (Blue) is in Winning_Group_Var.) Equal to True
          • (Player 2 (Blue) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 2 (Blue) slot status) Equal to Has left the game
              • (Player 2 (Blue) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(1), "King")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(1), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_Blue = 1
        • Else - Actions
      • -------- [CODE]~~ --------
      • -------- Player 3 Teal --------
      • -------- ~~[/CODE] --------
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 3 (Teal) is in Losing_Group_Var.) Equal to True
          • (Player 3 (Teal) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 3 (Teal) slot status) Equal to Has left the game
              • (Player 3 (Teal) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(2), "King")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(2), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_Teal = 0
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 3 (Teal) is in Winning_Group_Var.) Equal to True
          • (Player 3 (Teal) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 3 (Teal) slot status) Equal to Has left the game
              • (Player 3 (Teal) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(2), "King")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(2), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_Teal = 1
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 4 Purple --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 4 (Purple) is in Losing_Group_Var.) Equal to True
          • (Player 4 (Purple) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 4 (Purple) slot status) Equal to Has left the game
              • (Player 4 (Purple) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(3), "King")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(3), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_Purp = 0
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 4 (Purple) is in Winning_Group_Var.) Equal to True
          • (Player 4 (Purple) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 4 (Purple) slot status) Equal to Has left the game
              • (Player 4 (Purple) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(3), "King")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(3), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_Purp = 1
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 5 Yellow --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 5 (Yellow) is in Losing_Group_Var.) Equal to True
          • (Player 5 (Yellow) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 5 (Yellow) slot status) Equal to Has left the game
              • (Player 5 (Yellow) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(4), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(4), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_Yel = 0
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 5 (Yellow) is in Winning_Group_Var.) Equal to True
          • (Player 5 (Yellow) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 5 (Yellow) slot status) Equal to Has left the game
              • (Player 5 (Yellow) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(4), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(4), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_Yel = 1
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 6 Orange --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 6 (Orange) is in Losing_Group_Var.) Equal to True
          • (Player 6 (Orange) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 6 (Orange) slot status) Equal to Has left the game
              • (Player 6 (Orange) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(5), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(5), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_Oj = 0
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 6 (Orange) is in Winning_Group_Var.) Equal to True
          • (Player 6 (Orange) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 6 (Orange) slot status) Not equal to Has left the game
              • (Player 6 (Orange) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(5), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(5), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_Yel = 1
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 7 Light Green --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 7 (Green) is in Losing_Group_Var.) Equal to True
          • (Player 7 (Green) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 7 (Green) slot status) Equal to Has left the game
              • (Player 7 (Green) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(6), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(6), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_LG = 0
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 7 (Green) is in Winning_Group_Var.) Equal to True
          • (Player 7 (Green) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 7 (Green) slot status) Equal to Has left the game
              • (Player 7 (Green) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(6), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(6), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_LG = 1
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 8 Pink --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 8 (Pink) is in Losing_Group_Var.) Equal to True
          • (Player 8 (Pink) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 8 (Pink) slot status) Equal to Has left the game
              • (Player 8 (Pink) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(7), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(7), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_Pink = 0
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 8 (Pink) is in Winning_Group_Var.) Equal to True
          • (Player 8 (Pink) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 8 (Pink) slot status) Equal to Has left the game
              • (Player 8 (Pink) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(7), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(7), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_Pink = 1
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 9 Grey --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 9 (Gray) is in Losing_Group_Var.) Equal to True
          • (Player 9 (Gray) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 9 (Gray) slot status) Equal to Has left the game
              • (Player 9 (Gray) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(8), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(8), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_Gray = 0
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 9 (Gray) is in Winning_Group_Var.) Equal to True
          • (Player 9 (Gray) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 9 (Gray) slot status) Equal to Has left the game
              • (Player 9 (Gray) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(8), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(8), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_Gray = 1
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 10 Light Blue --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 10 (Light Blue) is in Losing_Group_Var.) Equal to True
          • (Player 10 (Light Blue) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 10 (Light Blue) slot status) Equal to Has left the game
              • (Player 10 (Light Blue) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(9), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(9), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_LBlue = 0
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 10 (Light Blue) is in Winning_Group_Var.) Equal to True
          • (Player 10 (Light Blue) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 10 (Light Blue) slot status) Equal to Has left the game
              • (Player 10 (Light Blue) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(9), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(9), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_LBlue = 1
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 11 Dark Green --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 11 (Dark Green) is in Losing_Group_Var.) Equal to True
          • (Player 11 (Dark Green) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 11 (Dark Green) slot status) Equal to Has left the game
              • (Player 11 (Dark Green) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(10), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(10), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_DGrn = 0
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 11 (Dark Green) is in Winning_Group_Var.) Equal to True
          • (Player 11 (Dark Green) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 11 (Dark Green) slot status) Equal to Has left the game
              • (Player 11 (Dark Green) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(10), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(10), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_DGrn = 1
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 12 Brown --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 12 (Brown) is in Losing_Group_Var.) Equal to True
          • (Player 12 (Brown) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 12 (Brown) slot status) Equal to Has left the game
              • (Player 12 (Brown) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(11), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(11), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_Brown = 0
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 12 (Brown) is in Winning_Group_Var.) Equal to True
          • (Player 12 (Brown) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 12 (Brown) slot status) Equal to Has left the game
              • (Player 12 (Brown) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(11), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(11), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_Brown = 1
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 17 Wheat --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 17 (Wheat) is in Losing_Group_Var.) Equal to True
          • (Player 17 (Wheat) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 17 (Wheat) slot status) Equal to Has left the game
              • (Player 17 (Wheat) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(16), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(16), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_LBrn = 0
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 17 (Wheat) is in Winning_Group_Var.) Equal to True
          • (Player 17 (Wheat) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 17 (Wheat) slot status) Equal to Has left the game
              • (Player 17 (Wheat) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(16), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(16), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_LBrn = 1
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 18 Peach --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 18 (Peach) is in Losing_Group_Var.) Equal to True
          • (Player 18 (Peach) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 18 (Peach) slot status) Equal to Has left the game
              • (Player 18 (Peach) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(17), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(17), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_Peach = 0
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 18 (Peach) is in Winning_Group_Var.) Equal to True
          • (Player 18 (Peach) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 18 (Peach) slot status) Equal to Has left the game
              • (Player 18 (Peach) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(17), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(17), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_Peach = 1
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 19 Mint --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 19 (Mint) is in Losing_Group_Var.) Equal to True
          • (Player 19 (Mint) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 19 (Mint) slot status) Equal to Has left the game
              • (Player 19 (Mint) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(18), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(18), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_Mint = 0
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 19 (Mint) is in Winning_Group_Var.) Equal to True
          • (Player 19 (Mint) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 19 (Mint) slot status) Equal to Has left the game
              • (Player 19 (Mint) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(18), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(18), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_Mint = 1
        • Else - Actions
      • Wait 0.10 seconds
      • -------- [CODE]~~ --------
      • -------- Player 20 Lavender --------
      • -------- ~~[/CODE] --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 20 (Lavender) is in Losing_Group_Var.) Equal to True
          • (Player 20 (Lavender) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 20 (Lavender) slot status) Equal to Has left the game
              • (Player 20 (Lavender) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(19), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(19), MMD_FLAG_LOSER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_LPurp = 0
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 20 (Lavender) is in Winning_Group_Var.) Equal to True
          • (Player 20 (Lavender) controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 20 (Lavender) slot status) Equal to Has left the game
              • (Player 20 (Lavender) slot status) Equal to Is playing
        • Then - Actions
          • Custom script: call MMD_UpdateValueString("mode", Player(19), "Knight")
          • Wait 0.10 seconds
          • Custom script: call MMD_FlagPlayer (Player(19), MMD_FLAG_WINNER)
          • Wait 0.10 seconds
          • Set VariableSet Final_Victory_Status_LPurp = 1
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_Red Equal to 0
        • Then - Actions
          • Game - Defeat Player 1 (Red) with the message: ...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_Red Equal to 1
        • 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
          • Final_Victory_Status_Blue Equal to 0
        • Then - Actions
          • Game - Defeat Player 2 (Blue) with the message: ...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_Blue Equal to 1
        • 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
          • Final_Victory_Status_Teal Equal to 0
        • Then - Actions
          • Game - Defeat Player 3 (Teal) with the message: ...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_Teal Equal to 1
        • 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
          • Final_Victory_Status_Purp Equal to 0
        • Then - Actions
          • Game - Defeat Player 4 (Purple) with the message: ...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_Purp Equal to 1
        • 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
          • Final_Victory_Status_Yel Equal to 0
        • Then - Actions
          • Game - Defeat Player 5 (Yellow) with the message: ...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_Yel Equal to 1
        • 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
          • Final_Victory_Status_Oj Equal to 0
        • Then - Actions
          • Game - Defeat Player 6 (Orange) with the message: ...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_Oj Equal to 1
        • 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
          • Final_Victory_Status_LG Equal to 0
        • Then - Actions
          • Game - Defeat Player 7 (Green) with the message: ...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_LG Equal to 1
        • 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
          • Final_Victory_Status_Pink Equal to 0
        • Then - Actions
          • Game - Defeat Player 8 (Pink) with the message: ...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_Pink Equal to 1
        • Then - Actions
          • Game - Victory Player 8 (Pink) (Show dialogs, Show scores)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_Gray Equal to 0
        • Then - Actions
          • Game - Defeat Player 9 (Gray) with the message: ...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_Gray Equal to 1
        • Then - Actions
          • Game - Victory Player 9 (Gray) (Show dialogs, Show scores)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_LBlue Equal to 0
        • Then - Actions
          • Game - Defeat Player 10 (Light Blue) with the message: ...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_LBlue Equal to 1
        • Then - Actions
          • Game - Victory Player 10 (Light Blue) (Show dialogs, Show scores)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_DGrn Equal to 0
        • Then - Actions
          • Game - Defeat Player 11 (Dark Green) with the message: ...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_DGrn Equal to 1
        • Then - Actions
          • Game - Victory Player 11 (Dark Green) (Show dialogs, Show scores)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_Brown Equal to 0
        • Then - Actions
          • Game - Defeat Player 12 (Brown) with the message: ...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_Brown Equal to 1
        • Then - Actions
          • Game - Victory Player 12 (Brown) (Show dialogs, Show scores)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_LBrn Equal to 0
        • Then - Actions
          • Game - Defeat Player 17 (Wheat) with the message: ...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_LBrn Equal to 1
        • Then - Actions
          • Game - Victory Player 17 (Wheat) (Show dialogs, Show scores)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_Peach Equal to 0
        • Then - Actions
          • Game - Defeat Player 18 (Peach) with the message: ...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_Peach Equal to 0
        • Then - Actions
          • Game - Victory Player 18 (Peach) (Show dialogs, Show scores)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_Mint Equal to 0
        • Then - Actions
          • Game - Defeat Player 19 (Mint) with the message: ...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_Mint Equal to 1
        • Then - Actions
          • Game - Victory Player 19 (Mint) (Show dialogs, Show scores)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_LPurp Equal to 0
        • Then - Actions
          • Game - Defeat Player 20 (Lavender) with the message: ...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status_LPurp Equal to 1
        • Then - Actions
          • Game - Victory Player 20 (Lavender) (Show dialogs, Show scores)
        • Else - Actions
      • Cinematic - Send transmission to Losing_Group_Var from a Neutral Passive.Orb Forger named |cffff0000GAME OVER... at (Center of (Playable map area)): Play No sound and display |cff00ff00Metadata .... Modify duration: Add 38.00 seconds and Wait
      • Cinematic - Send transmission to Winning_Group_Var from a Neutral Passive.Orb Forger named |cff00ff00VICTORY|r at (Center of (Playable map area)): Play No sound and display |cff00ff00Metadata .... Modify duration: Add 38.00 seconds and Wait
      • Wait 2.00 seconds
      • Trigger - Turn off (This trigger)
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,543
You don't need to make a new variable for each player. That's what Arrays are for:
  • Set Variable Final_Victory_Status[1] = 2
  • Set Variable Final_Victory_Status[2] = 2
  • Set Variable Final_Victory_Status[3] = 2
  • etc...
The Player number serves as the [Index] in the array. You can even use a For Loop to initialize the values. Or go into the Variable Editor and set the variable's Initial Value to 2.

You can then simplify the trigger by using a Player Group and using each player's Player Number as the [Index] in Final_Victory_Status[]:
  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • Set VariableSet Final_PN = (Player number of (Picked player))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Final_Victory_Status[Final_PN] Equal to 1
        • Then - Actions
          • -------- Victory --------
          • Game - Victory (Picked player) (Show dialogs, Show scores)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Final_Victory_Status[Final_PN] Equal to 0
            • Then - Actions
              • -------- Defeat --------
              • Game - Defeat (Picked player) with the message: ...
            • Else - Actions
Try to get into the habit of using this design method, it'll make your life so much easier. Player Groups + Arrays using Player number as their [Index] can remove all of the redundancy from your triggers.

Although, is this new Array even necessary when you have the Winning/Losing Player Groups? I imagine you could just do this:
  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Picked player) is in Winning_Group_Var. Equal to True
        • Then - Actions
          • -------- Victory --------
          • Game - Victory (Picked player) (Show dialogs, Show scores)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Picked player) is in Losing_Group_Var. Equal to True
            • Then - Actions
              • -------- Defeat --------
              • Game - Defeat (Picked player) with the message: ...
            • Else - Actions
OR better yet:
  • Player Group - Pick every player in Winning_Group_Var and do (Actions)
    • Loop - Actions
      • -------- Victory --------
      • Game - Victory (Picked player) (Show dialogs, Show scores)
  • Player Group - Pick every player in Losing_Group_Var and do (Actions)
    • Loop - Actions
      • -------- Defeat --------
      • Game - Defeat (Picked player) with the message: ...



Regarding my trigger, you can change the transmission stuff to be shown at the start like this:
  • Actions
    • Set VariableSet MMD_PN = (MMD_PN + 1)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • MMD_PN Equal to 1
      • Then - Actions
        • // send transmissions
      • Else - Actions
 
Last edited:
Level 18
Joined
Mar 16, 2008
Messages
721
One more question, wouldn't we want it to start skipping at player 13 since player 12 is a player, 13, 14, 15, 16 are computers. and resume again at 17 not 16? One more thing is this is logging the players in JASS, so isn't GUI player one equal to JASS player zero? or is that already the case?

Here's where the trigger is at:
  • Log Metadata Uncle
    • Events
      • Time - MMD_Timer expires
    • Conditions
    • Actions
      • Cinematic - Send transmission to Losing_Group_Var from a Neutral Passive.Orb Forger named |cffff0000GAME OVER... at (Center of (Playable map area)): Play No sound and display Please wait while m.... Modify duration: Add 38.00 seconds and Wait
      • Cinematic - Send transmission to Winning_Group_Var from a Neutral Passive.Orb Forger named |cff00ff00VICTORY|r at (Center of (Playable map area)): Play No sound and display Please wait while m.... Modify duration: Add 38.00 seconds and Wait
      • Set VariableSet MMD_PN = (MMD_PN + 1)
      • Set VariableSet MMD_Player = (Player(MMD_PN))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (MMD_Player controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (MMD_Player slot status) Equal to Is playing
              • (MMD_Player slot status) Equal to Has left the game
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (MMD_Player is in Winning_Group_Var.) Equal to True
            • Then - Actions
              • -------- Winner: --------
              • Custom script: call MMD_UpdateValueString("mode", udg_MMD_Player, udg_MMD_String[udg_MMD_PN])
              • Wait 0.10 seconds
              • Custom script: call MMD_FlagPlayer (udg_MMD_Player, MMD_FLAG_WINNER)
              • Wait 0.10 seconds
              • Set VariableSet MMD_Fin_Victory_Status[MMD_PN] = 1
            • Else - Actions
              • -------- Loser: --------
              • Custom script: call MMD_UpdateValueString("mode", udg_MMD_Player, udg_MMD_String[udg_MMD_PN])
              • Wait 0.10 seconds
              • Custom script: call MMD_FlagPlayer (udg_MMD_Player, MMD_FLAG_LOSER)
              • Wait 0.10 seconds
              • Set VariableSet MMD_Fin_Victory_Status[MMD_PN] = 0
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MMD_PN Equal to 12
        • Then - Actions
          • -------- Skip players 13, 14, 15, and 16: --------
          • Set VariableSet MMD_PN = 16
          • Trigger - Run Log Metadata Uncle <gen> (ignoring conditions)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • MMD_PN Equal to 20
            • Then - Actions
              • -------- All players have been logged, finish: --------
              • Player Group - Pick every player in (All players) and do (Actions)
                • Loop - Actions
                  • Set VariableSet MMD_Final_PN = (Player number of (Picked player))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • MMD_Fin_Victory_Status[MMD_Final_PN] Equal to 1
                    • Then - Actions
                      • -------- Victory --------
                      • Game - Victory (Picked player) (Show dialogs, Show scores)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • MMD_Fin_Victory_Status[MMD_Final_PN] Equal to 0
                        • Then - Actions
                          • -------- Defeat --------
                          • Game - Defeat (Picked player) with the message: |cffff0000GAME OVER...
                        • Else - Actions
              • Cinematic - Send transmission to Losing_Group_Var from a Neutral Passive.Orb Forger named |cffff0000GAME OVER... at (Center of (Playable map area)): Play No sound and display |cff00ff00Metadata .... Modify duration: Add 38.00 seconds and Wait
              • Cinematic - Send transmission to Winning_Group_Var from a Neutral Passive.Orb Forger named |cff00ff00VICTORY|r at (Center of (Playable map area)): Play No sound and display |cff00ff00Metadata .... Modify duration: Add 38.00 seconds and Wait
            • Else - Actions
              • -------- Run for the next player: --------
              • Trigger - Run Log Metadata Uncle <gen> (ignoring conditions)
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,543
One more question, wouldn't we want it to start skipping at player 13 since player 12 is a player, 13, 14, 15, 16 are computers. and resume again at 17 not 16? One more thing is this is logging the players in JASS, so isn't GUI player one equal to JASS player zero? or is that already the case?
No, and no.
We are skipping at 13 with how we're doing it. After 12 is finished we jump to 16, which then gets increased by 1 so it results in 17.

And in Jass the only time Players are indexed starting at 0 is if you use the Player() function.
vJASS:
local player p = Player(0) // this is player 1
You don't need to use Player() though, you can just supply a Player variable like I did and skip this annoyance.


Here are the mistakes in your trigger:
  • You're sending the transmission potentially 16 times (once for each player). I showed you how to do it, you need an If Then Else statement that checks if MMD_PN is Equal to 1. Do this at the start of the trigger like so:
    • Actions
      • Set VariableSet MMD_PN = (MMD_PN + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MMD_PN Equal to 1
        • Then - Actions
          • Cinematic - Send transmission to Winning_Group_Var...
          • Cinematic - Send transmission to Losing_Group_Var...
        • Else - Actions
  • You're still sending the transmissions at the end of the trigger, this doesn't need to happen anymore.
  • You don't even need MMD_Fin_Victory_Status[] or MMD_Final_PN. Sorry if I mislead you, I just wanted to show you how it could be done. Winning_Group_Var and Losing_Group_Var already have the Winning/Losing players, so you can simply do this:
    • Player Group - Pick every player in Winning_Group_Var and do (Actions)
      • Loop - Actions
        • Game - Victory (Picked player) (Show dialogs, Show scores)
    • Player Group - Pick every player in Losing_Group_Var and do (Actions)
      • Loop - Actions
        • Game - Defeat (Picked player) with the message: ...
 
Last edited:
Level 18
Joined
Mar 16, 2008
Messages
721
I think we may need to use Player() because the MMD Parse takes it like this? I'm confused.
  • Custom script: call MMD_FlagPlayer (Player(0), MMD_FLAG_WINNER)
Also I want to send the transmission at the end of the trigger. Kind of like the first transmission says "wait" and the final one says ok "game over, meta data is logged." By the end of the trigger MMD_PN is equal to 20 so a condition that it's equal to 1 will never be satisfied?

  • Log Metadata Uncle
    • Events
      • Time - MMD_Timer expires
    • Conditions
    • Actions
      • Cinematic - Send transmission to Losing_Group_Var from a Neutral Passive.Orb Forger named |cffff0000GAME OVER... at (Center of (Playable map area)): Play No sound and display Please wait while m.... Modify duration: Add 38.00 seconds and Wait
      • Cinematic - Send transmission to Winning_Group_Var from a Neutral Passive.Orb Forger named |cff00ff00VICTORY|r at (Center of (Playable map area)): Play No sound and display Please wait while m.... Modify duration: Add 38.00 seconds and Wait
      • Set VariableSet MMD_PN = (MMD_PN + 1)
      • Set VariableSet MMD_Player = (Player(MMD_PN))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (MMD_Player controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (MMD_Player slot status) Equal to Is playing
              • (MMD_Player slot status) Equal to Has left the game
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (MMD_Player is in Winning_Group_Var.) Equal to True
            • Then - Actions
              • -------- Winner: --------
              • Custom script: call MMD_UpdateValueString("mode", udg_MMD_Player, udg_MMD_String[udg_MMD_PN])
              • Wait 0.10 seconds
              • Custom script: call MMD_FlagPlayer (udg_MMD_Player, MMD_FLAG_WINNER)
              • Wait 0.10 seconds
              • Set VariableSet MMD_Fin_Victory_Status[MMD_PN] = 1
            • Else - Actions
              • -------- Loser: --------
              • Custom script: call MMD_UpdateValueString("mode", udg_MMD_Player, udg_MMD_String[udg_MMD_PN])
              • Wait 0.10 seconds
              • Custom script: call MMD_FlagPlayer (udg_MMD_Player, MMD_FLAG_LOSER)
              • Wait 0.10 seconds
              • Set VariableSet MMD_Fin_Victory_Status[MMD_PN] = 0
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MMD_PN Equal to 12
        • Then - Actions
          • -------- Skip players 13, 14, 15, and 16: --------
          • Set VariableSet MMD_PN = 16
          • Trigger - Run Log Metadata Uncle <gen> (ignoring conditions)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • MMD_PN Equal to 20
            • Then - Actions
              • -------- All players have been logged, finish: --------
              • Player Group - Pick every player in Winning_Group_Var and do (Actions)
                • Loop - Actions
                  • -------- Victory --------
                  • Game - Victory (Picked player) (Show dialogs, Show scores)
              • Player Group - Pick every player in Losing_Group_Var and do (Actions)
                • Loop - Actions
                  • -------- Defeat --------
                  • Game - Defeat (Picked player) with the message: |cffff0000GAME OVER...
              • Set VariableSet MMD_PN = (MMD_PN + 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MMD_PN Equal to 1
                • Then - Actions
                  • Cinematic - Send transmission to Losing_Group_Var from a Neutral Passive.Orb Forger named |cffff0000GAME OVER... at (Center of (Playable map area)): Play No sound and display |cff00ff00Metadata .... Modify duration: Add 38.00 seconds and Wait
                  • Cinematic - Send transmission to Winning_Group_Var from a Neutral Passive.Orb Forger named |cff00ff00VICTORY|r at (Center of (Playable map area)): Play No sound and display |cff00ff00Metadata .... Modify duration: Add 38.00 seconds and Wait
                • Else - Actions
            • Else - Actions
              • -------- Run for the next player: --------
              • Trigger - Run Log Metadata Uncle <gen> (ignoring conditions)
Thank you for schooling me.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,543
You're misunderstanding me. The very first thing you do in the trigger is check if MMD_PN is Equal to 1 (after MMD_PN has been increased). If it is, you send the starting transmissions.

You weren't supposed to add this again:
  • Set VariableSet MMD_PN = (MMD_PN + 1)
I was showing you where to put the If Then Else statement, which was at the start of the trigger after increasing MMD_PN.

If you want different transmissions at the end when MMD_PN is Equal to 20 that's fine, you can keep those.

And you can delete the MMD_Fin_Victory_Status variable.

Lastly, you don't need to use Player(), I promise you that. MMD_Player is the same exact thing. The function is simply asking that you provide a Player in the parenthesis (arguments). The Player provided will be the one that gets "flagged" or "logged" or whatever.

This...
  • Custom script: call MMD_FlagPlayer (Player(0), MMD_FLAG_WINNER)
Is no different from this:
  • Set Variable MMD_Player = Player 1 (red)
  • Custom script: call MMD_FlagPlayer (udg_MMD_Player, MMD_FLAG_WINNER)
 
Last edited:
Level 18
Joined
Mar 16, 2008
Messages
721
I've done one test and Uncle's trigger idea seems to parse every single player, not miss any, which is good (https://w3mmd.deno.dev/196853), but they are all marked as losers. So something must be wrong with the trigger that places them into winning and losing groups. Maybe I should make a new thread for this?

I don't see anything wrong with this trigger in terms of functionality. Maybe it could be simplified with loops but it should still add these players to the right groups???

  • Actions
  • ...
    • -------- [CODE]~~~~~~~ --------
    • -------- Team Red --------
    • -------- ~~~~~~~[/CODE] --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (King's Castle 0012 <gen> is alive) Equal to True
      • Then - Actions
        • Player Group - Pick every player in Group1Red and do (Actions)
          • Loop - Actions
            • Player Group - Add (Picked player) to Winning_Group_Var
            • Player Group - Remove (Picked player) from Losing_Group_Var.
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (King's Castle 0012 <gen> is dead) Equal to True
      • Then - Actions
        • Player Group - Pick every player in Group1Red and do (Actions)
          • Loop - Actions
            • Player Group - Add (Picked player) to Losing_Group_Var
            • Player Group - Remove (Picked player) from Winning_Group_Var.
      • Else - Actions
    • -------- [CODE]~~~~~~~ --------
    • -------- Team Blue --------
    • -------- ~~~~~~~[/CODE] --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (King's Castle 0025 <gen> is alive) Equal to True
      • Then - Actions
        • Player Group - Pick every player in Group2Blue and do (Actions)
          • Loop - Actions
            • Player Group - Add (Picked player) to Winning_Group_Var
            • Player Group - Remove (Picked player) from Losing_Group_Var.
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (King's Castle 0025 <gen> is dead) Equal to True
      • Then - Actions
        • Player Group - Pick every player in Group2Blue and do (Actions)
          • Loop - Actions
            • Player Group - Add (Picked player) to Losing_Group_Var
            • Player Group - Remove (Picked player) from Winning_Group_Var.
      • Else - Actions
    • -------- [CODE]~~~~~~~ --------
    • -------- Team Teal --------
    • -------- ~~~~~~~[/CODE] --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (King's Castle 0038 <gen> is alive) Equal to True
      • Then - Actions
        • Player Group - Pick every player in Group3Teal and do (Actions)
          • Loop - Actions
            • Player Group - Add (Picked player) to Winning_Group_Var
            • Player Group - Remove (Picked player) from Losing_Group_Var.
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (King's Castle 0038 <gen> is dead) Equal to True
      • Then - Actions
        • Player Group - Pick every player in Group2Blue and do (Actions)
          • Loop - Actions
            • Player Group - Add (Picked player) to Losing_Group_Var
            • Player Group - Remove (Picked player) from Winning_Group_Var.
      • Else - Actions
    • -------- [CODE]~~~~~~~ --------
    • -------- Team Purple --------
    • -------- ~~~~~~~[/CODE] --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (King's Castle 0051 <gen> is alive) Equal to True
      • Then - Actions
        • Player Group - Pick every player in Group4Purp and do (Actions)
          • Loop - Actions
            • Player Group - Add (Picked player) to Winning_Group_Var
            • Player Group - Remove (Picked player) from Losing_Group_Var.
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (King's Castle 0051 <gen> is dead) Equal to True
      • Then - Actions
        • Player Group - Pick every player in Group4Purp and do (Actions)
          • Loop - Actions
            • Player Group - Add (Picked player) to Losing_Group_Var
            • Player Group - Remove (Picked player) from Winning_Group_Var.
      • Else - Actions
    • -------- [CODE]~~~~~~~ --------
    • -------- Team Black and No Team --------
    • -------- ~~~~~~~[/CODE] --------
    • Player Group - Pick every player in Black_Group_Var and do (Actions)
      • Loop - Actions
        • Player Group - Add (Picked player) to Losing_Group_Var
        • Player Group - Remove (Picked player) from Winning_Group_Var.
    • Player Group - Pick every player in Group5_NoGroup and do (Actions)
      • Loop - Actions
        • Player Group - Add (Picked player) to Losing_Group_Var
        • Player Group - Remove (Picked player) from Winning_Group_Var.
  • ...
Also if a player leaves the game or is defeated before the final trigger runs, they are added to losing group variable with an Action similar to this:
  • Player Group - Remove Player 1 (Red) from Winning_Group_Var.
  • Player Group - Add Player 1 (Red) to Losing_Group_Var
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,543
Can you post the latest version of your Log Metadata trigger.

Also, Text Messages can help debug these situations so you can tell what's happening in-game.
"Player 1 has been added to the Winning group"
"Player 1 has been added to the Losing group"
 
Last edited:
Level 18
Joined
Mar 16, 2008
Messages
721
I'm so grateful for your attention. I've spent so much time on thes prior to posting. I can't figure it out.

Edit: I think this trigger works fine. It seems to log everyone's data, just some players aren't being added to the correct groups is my guess.

  • Log Metadata Uncle
    • Events
      • Time - MMD_Timer expires
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MMD_PN Equal to 1
        • Then - Actions
          • Cinematic - Send transmission to Losing_Group_Var from a Neutral Passive.Orb Forger named |cffff0000GAME OVER... at (Center of (Playable map area)): Play No sound and display Please wait while m.... Modify duration: Add 38.00 seconds and Wait
          • Cinematic - Send transmission to Winning_Group_Var from a Neutral Passive.Orb Forger named |cff00ff00VICTORY|r at (Center of (Playable map area)): Play No sound and display Please wait while m.... Modify duration: Add 38.00 seconds and Wait
        • Else - Actions
      • Set VariableSet MMD_PN = (MMD_PN + 1)
      • Set VariableSet MMD_Player = (Player(MMD_PN))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (MMD_Player controller) Not equal to Computer
          • Or - Any (Conditions) are true
            • Conditions
              • (MMD_Player slot status) Equal to Is playing
              • (MMD_Player slot status) Equal to Has left the game
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (MMD_Player is in Winning_Group_Var.) Equal to True
            • Then - Actions
              • -------- Winner: --------
              • Custom script: call MMD_UpdateValueString("mode", udg_MMD_Player, udg_MMD_String[udg_MMD_PN])
              • Wait 0.10 seconds
              • Custom script: call MMD_FlagPlayer (udg_MMD_Player, MMD_FLAG_WINNER)
              • Wait 0.10 seconds
            • Else - Actions
              • -------- Loser: --------
              • Custom script: call MMD_UpdateValueString("mode", udg_MMD_Player, udg_MMD_String[udg_MMD_PN])
              • Wait 0.10 seconds
              • Custom script: call MMD_FlagPlayer (udg_MMD_Player, MMD_FLAG_LOSER)
              • Wait 0.10 seconds
        • Else - Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MMD_PN Equal to 12
        • Then - Actions
          • -------- Skip players 13, 14, 15, and 16: --------
          • Set VariableSet MMD_PN = 16
          • Trigger - Run Log Metadata Uncle <gen> (ignoring conditions)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • MMD_PN Equal to 20
            • Then - Actions
              • -------- All players have been logged, finish: --------
              • Player Group - Pick every player in Winning_Group_Var and do (Actions)
                • Loop - Actions
                  • -------- Victory --------
                  • Game - Victory (Picked player) (Show dialogs, Show scores)
              • Player Group - Pick every player in Losing_Group_Var and do (Actions)
                • Loop - Actions
                  • -------- Defeat --------
                  • Game - Defeat (Picked player) with the message: |cffff0000GAME OVER...
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MMD_PN Equal to 20
                • Then - Actions
                  • Cinematic - Send transmission to Losing_Group_Var from a Neutral Passive.Orb Forger named |cffff0000GAME OVER... at (Center of (Playable map area)): Play No sound and display |cff00ff00Metadata .... Modify duration: Add 38.00 seconds and Wait
                  • Cinematic - Send transmission to Winning_Group_Var from a Neutral Passive.Orb Forger named |cff00ff00VICTORY|r at (Center of (Playable map area)): Play No sound and display |cff00ff00Metadata .... Modify duration: Add 38.00 seconds and Wait
                • Else - Actions
            • Else - Actions
              • -------- Run for the next player: --------
              • Trigger - Run Log Metadata Uncle <gen> (ignoring conditions)
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,543
At the start of the trigger change this:
  • If - Conditions
  • MMD_PN Equal to 1
To this:
  • If - Conditions
  • MMD_PN Equal to 0

And at the end of the trigger you're checking if MMD_PN is Equal to 20 twice. You don't need to do it a second time. Just send the two cinematic transmissions below the Pick every player stuff.

Lastly, try to run that King Is Dead trigger (the one that Adds players to Winning/Losing groups) to the start of the Log Metadata trigger. This way the Groups are always setup properly.
 
Status
Not open for further replies.
Top