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

[Trigger] what is wrong with the counting?

Status
Not open for further replies.
Hey I made triggers to give 10 honor to the hero who kills another hero in the gold panel. There is this trigger that gives honor and another triggerthat displayes in message how much honor you got!
HONOR => the honor you have all the time
TEMP_HONOR => it's counted only for the message, later erased.

look below
 
Last edited:
No, I said in the first post that temp is only for results, which means results from the round.

yes, only for owner.

the message dos nto display owner of killing unit also? is this the bug that messes counting?

  • Conditions
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Dying unit) Equal to Hero_units[(Integer A)]
            • Then - Actions
              • Game - Display to (All allies of (Owner of (Dying unit))) the text: (|c00FF0000 + ((Name of (Owner of (Killing unit))) + ( just ended + (Name of (Owner of (Dying unit))))))
              • Game - Display to (All enemies of (Owner of (Dying unit))) the text: (|c0020C000 + ((Name of (Owner of (Killing unit))) + ( just ended + (Name of (Owner of (Dying unit))))))
              • Set Game_Leftover_Of_Teams[1] = (Game_Leftover_Of_Teams[1] - 1)
              • Set HONOR[(Player number of (Owner of (Killing unit)))] = (HONOR[(Player number of (Owner of (Killing unit)))] + 10)
              • Set HONOR_TEMP[(Player number of (Owner of (Killing unit)))] = (HONOR_TEMP[(Player number of (Owner of (Killing unit)))] + 10)
              • Player - Set (Owner of (Killing unit)) Current gold to HONOR[(Player number of (Owner of (Killing unit)))]
              • Sound - Play HeroDies <gen>
            • Else - Actions
      • For each (Integer A) from 4 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Dying unit) Equal to Hero_units[(Integer A)]
            • Then - Actions
              • Game - Display to (All allies of (Owner of (Dying unit))) the text: (|c00FF0000 + ((Name of (Owner of (Killing unit))) + ( just ended + (Name of (Owner of (Dying unit))))))
              • Game - Display to (All enemies of (Owner of (Dying unit))) the text: (|c0020C000 + ((Name of (Owner of (Killing unit))) + ( just ended + (Name of (Owner of (Dying unit))))))
              • Set Game_Leftover_Of_Teams[2] = (Game_Leftover_Of_Teams[2] - 1)
              • Set HONOR[(Player number of (Owner of (Killing unit)))] = (HONOR[(Player number of (Owner of (Killing unit)))] + 10)
              • Set HONOR_TEMP[(Player number of (Owner of (Killing unit)))] = (HONOR_TEMP[(Player number of (Owner of (Killing unit)))] + 10)
              • Sound - Play HeroDies <gen>
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Game_Leftover_Of_Teams[1] Equal to 0
        • Then - Actions
          • Countdown Timer - Pause EventTimer
          • Set Game_Result = 2
          • Set Game_Leftover_Of_Teams[1] = 2
          • Set Game_Leftover_Of_Teams[2] = 2
          • Set Game_Scores[2] = (Game_Scores[2] + 1)
          • Multiboard - Change the title of Multiboard to (|c00FFFF09 + ((String(Game_Scores[1])) + (|r : |c0080FF00 + ((String(Game_Scores[2])) + |r))))
          • Game - Display to (All players) the text: (|c0020C000Green team|r won! Current score: + ((String(Game_Scores[1])) + ( : + (String(Game_Scores[2])))))
          • For each (Integer A) from 1 to 6, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Players[(Integer A)] slot status) Equal to Is playing
                • Then - Actions
                  • Game - Display to (Player group(Players[(Integer A)])) the text: (You did + ((String(DAMAGE_DONE[(Player number of Players[(Integer A)])])) + ( damage. + (You place + (Position[(Position of Players[(Integer A)] in Leaderboard)] + (. You earned + ((String(HONOR_TEMP[(Integer A)])) + honor points.)))))))
                • Else - Actions
          • Dialog - Change the title of Dialog_EndGame to Game_EndGameDialog_Text[Game_Result]
          • Multiboard - Hide Multiboard
          • Set PAUSE = (Units in (Playable map area) matching ((Owner of (Matching unit)) Not equal to Neutral Passive))
          • Unit Group - Pick every unit in PAUSE and do (Actions)
            • Loop - Actions
              • Unit - Pause (Picked unit)
          • Custom script: call DestroyGroup(udg_PAUSE)
          • Dialog - Show Dialog_EndGame for Players[CurrentHost]
          • Sound - Play RoundEnds <gen>
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Game_Leftover_Of_Teams[2] Equal to 0
        • Then - Actions
          • Countdown Timer - Pause EventTimer
          • Set Game_Result = 1
          • Set Game_Leftover_Of_Teams[1] = 2
          • Set Game_Leftover_Of_Teams[2] = 2
          • Set Game_Scores[1] = (Game_Scores[1] + 1)
          • Game - Display to (All players) the text: (|c00FFD700Gold team|r won! Current score: + ((String(Game_Scores[1])) + ( : + (String(Game_Scores[2])))))
          • For each (Integer A) from 1 to 6, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Players[(Integer A)] slot status) Equal to Is playing
                • Then - Actions
                  • Game - Display to (Player group(Players[(Integer A)])) the text: (You did + ((String(DAMAGE_DONE[(Player number of Players[(Integer A)])])) + ( damage. + (You place + (Position[(Position of Players[(Integer A)] in Leaderboard)] + (. You earned + ((String(HONOR_TEMP[(Integer A)])) + honor points.)))))))
                • Else - Actions
          • Dialog - Change the title of Dialog_EndGame to Game_EndGameDialog_Text[Game_Result]
          • Set PAUSE = (Units in (Playable map area) matching ((Owner of (Matching unit)) Not equal to Neutral Passive))
          • Unit Group - Pick every unit in PAUSE and do (Actions)
            • Loop - Actions
              • Unit - Pause (Picked unit)
          • Custom script: call DestroyGroup(udg_PAUSE)
          • Multiboard - Hide Multiboard
          • Dialog - Show Dialog_EndGame for Players[CurrentHost]
          • Sound - Play RoundEnds <gen>
          • Skip remaining actions
        • Else - Actions
 
Last edited:
Status
Not open for further replies.
Top