• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Gold Text Help

Status
Not open for further replies.
Level 7
Joined
Oct 16, 2010
Messages
194
  • CreepsBounty
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • For each (Integer A) from 0 to NumberOfBuildings, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Dying unit)) Equal to UnitType[(Integer A)]
            • Then - Actions
              • Set TempInteger = (Player number of (Owner of (Killing unit)))
              • Set TempInteger2 = UnitBounty[(Integer A)]
              • Set TempPlayer = (Owner of (Killing unit))
              • Player - Add UnitBounty[(Integer A)] to (Player(TempInteger)) Current gold
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • TempInteger2 Not equal to 0
                • Then - Actions
                  • Custom script: call showUnitTextPlayer (GetDyingUnit(), "+" + I2S(udg_TempInteger2), 100.00, 77.00, 0.00, ConvertedPlayer(udg_TempInteger))
                • Else - Actions
            • Else - Actions
Can someone help me fix this trigger? When I save this map it gives the "Expected a function name" error. THis trigger is supposed to show a text which says the amouth of bounty the creep gives.
 
Level 7
Joined
Oct 16, 2010
Messages
194
I'm not sure but i got that part from legion TD war 1.50 editors version. Its supposed to show the creep bounty. Here is the original code from legion TD war. (BTW the creator of this map allowed other people to learn from this map.)
  • Creep Deaths
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • ((Dying unit) is in Creeps_UnitGroup) Equal to True
          • ((Dying unit) is in Summons_UnitGroup) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Custom value of (Killing unit)) Not equal to 0
          • (Owner of (Dying unit)) Not equal to (Owner of (Killing unit))
        • Then - Actions
          • Set Temp_Integer = (Custom value of (Killing unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Integer Greater than or equal to 1
              • Temp_Integer Less than or equal to 8
            • Then - Actions
              • Set PlayerKills_Integer[Temp_Integer] = (PlayerKills_Integer[Temp_Integer] + 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ModeMM Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Owner of (Killing unit)) Equal to Player 9 (Gray)
                    • Then - Actions
                      • Custom script: if IsPlayerAlly( GetLocalPlayer(), Player(8)) or IsPlayerObserver(GetLocalPlayer()) then
                      • Multiboard - Set the text for Scoreboard item in column 2, row ScoreboardRow[Temp_Integer] to (KillsColor + (String(PlayerKills_Integer[Temp_Integer])))
                      • Custom script: else
                      • Multiboard - Set the text for Scoreboard item in column 2, row ScoreboardRow[Temp_Integer] to ?
                      • Custom script: endif
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Owner of (Killing unit)) Equal to Player 10 (Light Blue)
                    • Then - Actions
                      • Custom script: if IsPlayerAlly( GetLocalPlayer(), Player(9)) or IsPlayerObserver(GetLocalPlayer()) then
                      • Multiboard - Set the text for Scoreboard item in column 2, row ScoreboardRow[Temp_Integer] to (KillsColor + (String(PlayerKills_Integer[Temp_Integer])))
                      • Custom script: else
                      • Multiboard - Set the text for Scoreboard item in column 2, row ScoreboardRow[Temp_Integer] to ?
                      • Custom script: endif
                    • Else - Actions
                • Else - Actions
                  • Multiboard - Set the text for Scoreboard item in column 2, row ScoreboardRow[Temp_Integer] to (KillsColor + (String(PlayerKills_Integer[Temp_Integer])))
            • Else - Actions
          • -------- Creep Bounty --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Dying unit) is Summoned) Equal to True
            • Then - Actions
              • Set Temp_Integer2 = (Level of (Dying unit))
            • Else - Actions
              • Set Temp_Integer2 = LevelBounty_Integer[Level_Integer]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of No Bounty (buff icon + flag) for (Dying unit)) Equal to 1
            • Then - Actions
              • Set LeaksCaught[(Custom value of (Killing unit))] = (LeaksCaught[(Custom value of (Killing unit))] + 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ModeHG Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Killing unit) Equal to The King 0009 <gen>
                    • Then - Actions
                      • Player - Add Temp_Integer2 to Player 10 (Light Blue) Current gold
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Killing unit) Equal to The King 0006 <gen>
                    • Then - Actions
                      • Player - Add Temp_Integer2 to Player 9 (Gray) Current gold
                    • Else - Actions
                  • Set Temp_Integer2 = 0
                • Else - Actions
                  • Set Temp_Integer2 = 0
            • Else - Actions
          • Set GoldFromKills[Temp_Integer] = (GoldFromKills[Temp_Integer] + Temp_Integer2)
          • Player - Add Temp_Integer2 to (Player(Temp_Integer)) Current gold
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Integer2 Not equal to 0
            • Then - Actions
              • Custom script: call showUnitTextPlayer (GetDyingUnit(), "+" + I2S(udg_Temp_Integer2), 100.00, 77.00, 0.00, ConvertedPlayer(udg_Temp_Integer))
            • Else - Actions
        • Else - Actions
      • Unit Group - Remove (Dying unit) from Creeps_UnitGroup
      • Unit Group - Remove (Dying unit) from Summons_UnitGroup
 
Status
Not open for further replies.
Top