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

Map Lag - Laggy Triggers?

Status
Not open for further replies.
Level 16
Joined
Mar 27, 2011
Messages
1,349
Hi, I have been editting a hero defence map which a lot of players find laggy. I think the main source of lag is these two triggers below.

Important Info: I have a lot of enemy units being spawned who can die really fast. As soon as an enemy dies, 1 or 2 enemies spawn to replace it. So "Trigger 1" runs when a unit dies, then "Trigger 2" runs when unit(s) are created. So when a hero uses their ultimate spell and kills 10 units at once, these triggers will both run 10 times...Im guessing this creates a LOT of load on people's computers. How can I improve these triggers to make them less laggy, or replace them with better triggers?

  • Update Multiboard
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Killing unit) Not equal to No unit
      • (Owner of (Killing unit)) Not equal to Player 11 (Dark Green)
      • (Owner of (Killing unit)) Not equal to Player 12 (Brown)
      • ((Dying unit) belongs to an enemy of Player 11 (Dark Green)) Equal to True
      • (Unit-type of (Dying unit)) Not equal to Sub Zero Dummy Caster
      • (Unit-type of (Dying unit)) Not equal to Rogue Hero Fake
      • (Unit-type of (Dying unit)) Not equal to Dummy Hero
      • (Unit-type of (Dying unit)) Not equal to Dummy Energy Shield Caster (Level 3)
      • (Unit-type of (Dying unit)) Not equal to Dummy Energy Shield Caster (Level 2)
      • (Unit-type of (Dying unit)) Not equal to Dummy Energy Shield Caster (Level 1)
      • (Unit-type of (Dying unit)) Not equal to Holy Matrix
      • (Unit-type of (Dying unit)) Not equal to Hook
      • (Unit-type of (Dying unit)) Not equal to Lit Fuse (Dwarven)
      • (Unit-type of (Dying unit)) Not equal to Locust 2 Owl
      • (Unit-type of (Dying unit)) Not equal to Locust 3 Healing Matrix
      • (Unit-type of (Dying unit)) Not equal to Black Hole DUMMY
      • (Unit-type of (Dying unit)) Not equal to Black Hole (Graphic)
    • Actions
      • Set MB_Owner_Killing_PNumber = (Player number of (Owner of (Killing unit)))
      • Set MB_KillingU[MB_Owner_Killing_PNumber] = (Killing unit)
      • Set MB_DyingU[MB_Owner_Killing_PNumber] = (Dying unit)
      • Set MB_KillingU_Owner = (Player(MB_Owner_Killing_PNumber))
      • Set Kills[MB_Owner_Killing_PNumber] = (Kills[MB_Owner_Killing_PNumber] + 1)
      • -------- lumber --------
      • Player - Add (Random integer number between 1 and 12) to MB_KillingU_Owner Current lumber
      • Set ComboRecord_BreakLock = False
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FirstBlood_SoundLock[MB_Owner_Killing_PNumber] Equal to False
          • LocalPlayer Equal to MB_KillingU_Owner
        • Then - Actions
          • Set FirstBlood_SoundLock[MB_Owner_Killing_PNumber] = True
          • Set LeaderBoard_AnnounceString[MB_Owner_Killing_PNumber] = |c00FF8000 F I R S T B L O O D !|r
          • Sound - Play ut_firstblood <gen>
        • Else - Actions
          • Set LeaderBoard_AnnounceString[MB_Owner_Killing_PNumber] = |c00FF8000 K I L L P O I N T !|r
      • -------- Kill Streak Rewards --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of MB_DyingU[MB_Owner_Killing_PNumber]) Equal to Player 12 (Brown)
          • MB_KillingU_Owner Not equal to Player 11 (Dark Green)
          • MB_KillingU_Owner Not equal to Player 12 (Brown)
          • (MB_KillingU_Owner slot status) Equal to Is playing
          • Kills[MB_Owner_Killing_PNumber] Greater than 49
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Kills[MB_Owner_Killing_PNumber] Equal to 50
            • Then - Actions
              • Game - Display to (All players) for 4.00 seconds the text: (|c00FFFF00 + ((Name of MB_KillingU_Owner) + ( |ris on a killing spree! + (|c00FF000050+ Kill Streak!|r ) 250 "Gold Coins" Awarded.)))
              • Player - Add 250 to MB_KillingU_Owner Current gold
              • Sound - Play ut_1_killingspree <gen>
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Hero_Pick[MB_Owner_Killing_PNumber] is alive) Equal to True
                • Then - Actions
                  • Special Effect - Create a special effect attached to the overhead of Hero_Pick[MB_Owner_Killing_PNumber] using UI\Feedback\GoldCredit\GoldCredit.mdl
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
                  • Do nothing
            • Else - Actions
              • Do nothing
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Kills[MB_Owner_Killing_PNumber] Equal to 100
            • Then - Actions
              • Game - Display to (All players) for 4.00 seconds the text: (|c00FFFF00 + ((Name of MB_KillingU_Owner) + ( |ris dominating! + (|c00FF0000100+ Kill Streak!|r ) 500 "Gold Coins" Awarded.)))
              • Player - Add 500 to MB_KillingU_Owner Current gold
              • Sound - Play ut_2_dominating <gen>
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Hero_Pick[MB_Owner_Killing_PNumber] is alive) Equal to True
                • Then - Actions
                  • Special Effect - Create a special effect attached to the overhead of Hero_Pick[MB_Owner_Killing_PNumber] using UI\Feedback\GoldCredit\GoldCredit.mdl
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
                  • Do nothing
            • Else - Actions
              • Do nothing
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Kills[MB_Owner_Killing_PNumber] Equal to 175
            • Then - Actions
              • Game - Display to (All players) for 4.00 seconds the text: (|c00FFFF00 + ((Name of MB_KillingU_Owner) + ( |ris on a rampage! + (|c00FF0000175+ Kill Streak!|r ) 750 "Gold Coins" Awarded.)))
              • Player - Add 750 to MB_KillingU_Owner Current gold
              • Sound - Play ut_3_rampage <gen>
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Hero_Pick[MB_Owner_Killing_PNumber] is alive) Equal to True
                • Then - Actions
                  • Special Effect - Create a special effect attached to the overhead of Hero_Pick[MB_Owner_Killing_PNumber] using UI\Feedback\GoldCredit\GoldCredit.mdl
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
                  • Do nothing
            • Else - Actions
              • Do nothing
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Kills[MB_Owner_Killing_PNumber] Equal to 275
            • Then - Actions
              • Game - Display to (All players) for 4.00 seconds the text: (|c00FFFF00 + ((Name of MB_KillingU_Owner) + ( |ris wicked sick! + (|c00FF0000275+ Kill Streak!|r ) 1,000 "Gold Coins" Awarded.)))
              • Player - Add 1000 to MB_KillingU_Owner Current gold
              • Sound - Play ut_4_wickedsick <gen>
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Hero_Pick[MB_Owner_Killing_PNumber] is alive) Equal to True
                • Then - Actions
                  • Special Effect - Create a special effect attached to the overhead of Hero_Pick[MB_Owner_Killing_PNumber] using UI\Feedback\GoldCredit\GoldCredit.mdl
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
                  • Do nothing
            • Else - Actions
              • Do nothing
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Kills[MB_Owner_Killing_PNumber] Equal to 400
            • Then - Actions
              • Game - Display to (All players) for 4.00 seconds the text: (|c00FFFF00 + ((Name of MB_KillingU_Owner) + ( |ris a headhunter! + (|c00FF0000400+ Kill Streak!|r ) 1,250 "Gold Coins" Awarded.)))
              • Player - Add 1250 to MB_KillingU_Owner Current gold
              • Sound - Play ut_5_headhunter <gen>
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Hero_Pick[MB_Owner_Killing_PNumber] is alive) Equal to True
                • Then - Actions
                  • Special Effect - Create a special effect attached to the overhead of Hero_Pick[MB_Owner_Killing_PNumber] using UI\Feedback\GoldCredit\GoldCredit.mdl
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
                  • Do nothing
            • Else - Actions
              • Do nothing
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Kills[MB_Owner_Killing_PNumber] Equal to 600
            • Then - Actions
              • Game - Display to (All players) for 4.00 seconds the text: (|c00FFFF00 + ((Name of MB_KillingU_Owner) + ( |ris unstoppable! + (|c00FF0000600+ Kill Streak!|r ) 1,500 "Gold Coins" Awarded.)))
              • Player - Add 1500 to MB_KillingU_Owner Current gold
              • Sound - Play ut_6_unstoppable <gen>
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Hero_Pick[MB_Owner_Killing_PNumber] is alive) Equal to True
                • Then - Actions
                  • Special Effect - Create a special effect attached to the overhead of Hero_Pick[MB_Owner_Killing_PNumber] using UI\Feedback\GoldCredit\GoldCredit.mdl
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
                  • Do nothing
            • Else - Actions
              • Do nothing
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Kills[MB_Owner_Killing_PNumber] Equal to 1000
            • Then - Actions
              • Game - Display to (All players) for 4.00 seconds the text: (|c00FFFF00 + ((Name of MB_KillingU_Owner) + ( |ris a GOD! + (|c00FF00001000+ Kill Streak!|r ) 3,000 "Gold Coins" Awarded.)))
              • Player - Add 3000 to MB_KillingU_Owner Current gold
              • Sound - Play ut2k3_godlike <gen>
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Hero_Pick[MB_Owner_Killing_PNumber] is alive) Equal to True
                • Then - Actions
                  • Special Effect - Create a special effect attached to the overhead of Hero_Pick[MB_Owner_Killing_PNumber] using UI\Feedback\GoldCredit\GoldCredit.mdl
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
                  • Do nothing
            • Else - Actions
              • Do nothing
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Kills[MB_Owner_Killing_PNumber] Equal to 2000
            • Then - Actions
              • Game - Display to (All players) for 4.00 seconds the text: (|c00FFFF00 + ((Name of MB_KillingU_Owner) + ( |rmust be cheating!! + (|c00FF00002000+ Kill Streak!|r ) 5,000 "Gold Coins" Awarded.)))
              • Player - Add 5000 to MB_KillingU_Owner Current gold
              • Sound - Play ut2k3_holyshit <gen>
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Hero_Pick[MB_Owner_Killing_PNumber] is alive) Equal to True
                • Then - Actions
                  • Special Effect - Create a special effect attached to the overhead of Hero_Pick[MB_Owner_Killing_PNumber] using UI\Feedback\GoldCredit\GoldCredit.mdl
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
                  • Do nothing
            • Else - Actions
              • Do nothing
        • Else - Actions
          • Do nothing
      • -------- COMBOS --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of MB_KillingU[MB_Owner_Killing_PNumber]) Not equal to Guard Tower
          • (Unit-type of MB_KillingU[MB_Owner_Killing_PNumber]) Not equal to Cannon Tower
          • (Unit-type of MB_KillingU[MB_Owner_Killing_PNumber]) Not equal to Arcane Tower
        • Then - Actions
          • Set ComboCounter[MB_Owner_Killing_PNumber] = (ComboCounter[MB_Owner_Killing_PNumber] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ComboCounter[MB_Owner_Killing_PNumber] Greater than ComboRecord
            • Then - Actions
              • Set ComboRecord = ComboCounter[MB_Owner_Killing_PNumber]
              • Set ComboRecord_BreakLock = True
              • For each (Integer A) from 1 to 10, do (Actions)
                • Loop - Actions
                  • Multiboard - Set the icon for Multiboard[(Integer A)] item in column 4, row Multiboard_PlayerRow[MB_Owner_Killing_PNumber] to ReplaceableTextures\CommandButtons\BTNMedalionOfCourage.blp
                  • For each (Integer B) from 1 to 10, do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Player((Integer B))) Not equal to MB_KillingU_Owner
                        • Then - Actions
                          • Multiboard - Set the icon for Multiboard[(Integer A)] item in column 4, row Multiboard_PlayerRow[(Integer B)] to UI\Minimap\MinimapIconCreepLoc2.blp
                        • Else - Actions
                          • Do nothing
            • Else - Actions
              • Do nothing
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ComboCounter[MB_Owner_Killing_PNumber] Greater than 1
            • Then - Actions
              • Set LeaderBoard_String[MB_Owner_Killing_PNumber] = (|c00FF8000 + ((String(ComboCounter[MB_Owner_Killing_PNumber])) + H I T C O M B O !|r))
            • Else - Actions
              • Set LeaderBoard_String[MB_Owner_Killing_PNumber] = LeaderBoard_AnnounceString[MB_Owner_Killing_PNumber]
          • Leaderboard - Change the title of LeaderBoard[MB_Owner_Killing_PNumber] to LeaderBoard_String[MB_Owner_Killing_PNumber]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ComboRecord_BreakLock Equal to True
            • Then - Actions
              • Leaderboard - Change the display style for LeaderBoard[MB_Owner_Killing_PNumber] to Show the title, Show labels, Hide values, and Hide icons
              • Leaderboard - Add MB_KillingU_Owner to LeaderBoard[MB_Owner_Killing_PNumber] with label N E W R E C O R D ... and value ComboRecord
              • Leaderboard - Change the label for MB_KillingU_Owner in LeaderBoard[MB_Owner_Killing_PNumber] to N E W R E C O R D ...
            • Else - Actions
              • Leaderboard - Change the display style for LeaderBoard[MB_Owner_Killing_PNumber] to Show the title, Hide labels, Hide values, and Hide icons
              • Leaderboard - Remove MB_KillingU_Owner from LeaderBoard[MB_Owner_Killing_PNumber]
          • Set ComboRecord_BreakLock = False
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • LeaderBoard_PermLock[MB_Owner_Killing_PNumber] Equal to True
              • LeaderBoard_AutoLock[MB_Owner_Killing_PNumber] Equal to True
            • Then - Actions
              • Leaderboard - Show LeaderBoard[MB_Owner_Killing_PNumber]
              • Set LeaderBoard_AutoLock[MB_Owner_Killing_PNumber] = False
            • Else - Actions
              • Do nothing
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ComboCounter[MB_Owner_Killing_PNumber] Greater than 0
            • Then - Actions
              • Set ComboExpire_Real = (1.40 + ((0.01 x 0.10) x (Max life of MB_DyingU[MB_Owner_Killing_PNumber])))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ComboExpire_Real Greater than 3.50
                • Then - Actions
                  • Set ComboExpire_Real = 3.50
                • Else - Actions
                  • Do nothing
              • Countdown Timer - Start ComboTimer[MB_Owner_Killing_PNumber] as a One-shot timer that will expire in ComboExpire_Real seconds
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ComboCounter[MB_Owner_Killing_PNumber] Greater than 4
                  • (Tree Elder 0004 <gen> is alive) Equal to True
                  • (Hero_Pick[MB_Owner_Killing_PNumber] is alive) Equal to True
                  • Or - Any (Conditions) are true
                    • Conditions
                      • And - All (Conditions) are true
                        • Conditions
                          • (Level of Item Attack Speed Bonus (Greater) (Combo) for Hero_Pick[MB_Owner_Killing_PNumber]) Less than 1
                          • (Hero_Pick[MB_Owner_Killing_PNumber] is being transported) Equal to False
                      • And - All (Conditions) are true
                        • Conditions
                          • (Level of Item Attack Speed Bonus (Greater) (Combo) for BurrowLockdown_TransportU) Less than 1
                          • (Hero_Pick[MB_Owner_Killing_PNumber] is loaded into BurrowLockdown_TransportU) Equal to True
                      • And - All (Conditions) are true
                        • Conditions
                          • (Level of Item Attack Speed Bonus (Greater) (Combo) for WarWagon_TransportU) Less than 1
                          • (Hero_Pick[MB_Owner_Killing_PNumber] is loaded into WarWagon_TransportU) Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Hero_Pick[MB_Owner_Killing_PNumber] is being transported) Equal to True
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Item Attack Speed Bonus (Greater) (Combo) for BurrowLockdown_TransportU) Less than 1
                          • (Hero_Pick[MB_Owner_Killing_PNumber] is loaded into BurrowLockdown_TransportU) Equal to True
                        • Then - Actions
                          • Unit - Add Item Attack Speed Bonus (Greater) (Combo) to BurrowLockdown_TransportU
                          • Special Effect - Create a special effect attached to the origin of BurrowLockdown_TransportU using Abilities\Spells\Undead\DeathPact\DeathPactTarget.mdl
                          • Special Effect - Destroy (Last created special effect)
                        • Else - Actions
                          • Do nothing
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Item Attack Speed Bonus (Greater) (Combo) for WarWagon_TransportU) Less than 1
                          • (Hero_Pick[MB_Owner_Killing_PNumber] is loaded into WarWagon_TransportU) Equal to True
                        • Then - Actions
                          • Unit - Add Item Attack Speed Bonus (Greater) (Combo) to WarWagon_TransportU
                          • Special Effect - Create a special effect attached to the origin of WarWagon_TransportU using Abilities\Spells\Undead\DeathPact\DeathPactTarget.mdl
                          • Special Effect - Destroy (Last created special effect)
                        • Else - Actions
                          • Do nothing
                    • Else - Actions
                      • Unit - Add Item Attack Speed Bonus (Greater) (Combo) to Hero_Pick[MB_Owner_Killing_PNumber]
                      • Special Effect - Create a special effect attached to the origin of Hero_Pick[MB_Owner_Killing_PNumber] using Abilities\Spells\Undead\DeathPact\DeathPactTarget.mdl
                      • Special Effect - Destroy (Last created special effect)
                • Else - Actions
                  • Do nothing
            • Else - Actions
              • Do nothing
        • Else - Actions
          • Do nothing
      • -------- Update All Multiboards --------
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Multiboard - Set the text for Multiboard[(Integer A)] item in column 2, row Multiboard_PlayerRow[MB_Owner_Killing_PNumber] to (String(Kills[MB_Owner_Killing_PNumber]))
          • Multiboard - Set the text for Multiboard[(Integer A)] item in column 4, row Multiboard_PlayerRow[MB_Owner_Killing_PNumber] to (String(ComboCounter[MB_Owner_Killing_PNumber]))
      • -------- Update Only The Killers Multiboard Title --------
      • Set Multiboard_String[MB_Owner_Killing_PNumber] = (|cffc3dbffKStreak: + ((String(Kills[MB_Owner_Killing_PNumber])) + (|r / |c00FF8000Combo Record: + ((String(ComboRecord)) + |r))))
      • Multiboard - Change the title of Multiboard[MB_Owner_Killing_PNumber] to Multiboard_String[MB_Owner_Killing_PNumber]
  • EnteringDamageEvent NonLocal
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • -------- Damage Add --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Max life of (Dying unit)) Not equal to 1.00
          • (Unit-type of (Entering unit)) Not equal to Jig
          • (Unit-type of (Entering unit)) Not equal to Voodoo Ward
          • (Unit-type of (Entering unit)) Not equal to Land Mine (Level 1) (Dwarven
          • (Unit-type of (Entering unit)) Not equal to Land Mine (Level 2) (Dwarven
          • (Unit-type of (Entering unit)) Not equal to Land Mine (Level 3) (Dwarven
          • (Unit-type of (Entering unit)) Not equal to TNT (Dwarven)
          • (Unit-type of (Entering unit)) Not equal to Spirit of the Grove (Kindred Spirit spell)
          • (Unit-type of (Entering unit)) Not equal to Baby Sandling
          • (Unit-type of (Entering unit)) Not equal to Lingering Soul (Ghost)
          • (Unit-type of (Entering unit)) Not equal to Dummy Energy Shield Caster (Level 1)
          • (Unit-type of (Entering unit)) Not equal to Dummy Energy Shield Caster (Level 2)
          • (Unit-type of (Entering unit)) Not equal to Dummy Energy Shield Caster (Level 3)
          • (Unit-type of (Entering unit)) Not equal to Dark Brood (Dark Seeker)
          • (Unit-type of (Entering unit)) Not equal to Shadow Pulse (Dark Seeker)
          • (Unit-type of (Entering unit)) Not equal to Spider Lair (Dark Seeker)
          • (Unit-type of (Entering unit)) Not equal to Webspinner End (Dark Seeker)
          • ((Entering unit) is A structure) Equal to False
        • Then - Actions
          • -------- Caustic Trident Item --------
          • Trigger - Add to Caustic Trident Multi <gen> the event (Unit - (Entering unit) Takes damage)
          • -------- Caustic Trident Item End --------
          • -------- Chain of Command --------
          • Trigger - Add to ChainOfCommand Damage <gen> the event (Unit - (Entering unit) Takes damage)
          • -------- Chain of Command End --------
          • -------- Tear --------
          • Trigger - Add to Tear Dmg <gen> the event (Unit - (Entering unit) Takes damage)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Entering unit)) Equal to Necromancer
            • Then - Actions
              • Trigger - Add to Tear Dmg Caster <gen> the event (Unit - (Entering unit) Takes damage)
            • Else - Actions
              • Do nothing
          • -------- Tear end --------
          • -------- Ox Stamina --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Entering unit)) Equal to Tauren Champion (hero)
            • Then - Actions
              • Trigger - Add to OxStamina AttackLimiter <gen> the event (Unit - (Entering unit) Takes damage)
            • Else - Actions
              • Do nothing
          • -------- Ox Stamina End --------
          • -------- Defend MT --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Unit-type of (Entering unit)) Equal to Blood Elf Lieutenant (Shield)
                  • (Unit-type of (Entering unit)) Equal to Blood Elf Lieutenant
            • Then - Actions
              • Trigger - Add to Defend MT Attacked <gen> the event (Unit - (Entering unit) Takes damage)
            • Else - Actions
              • Do nothing
          • Trigger - Add to Defend MT Area Dmg <gen> the event (Unit - (Entering unit) Takes damage)
          • -------- Defend MT End --------
          • -------- Fiend - Blood Lust --------
          • Trigger - Add to Fiend Bloodlust Steal <gen> the event (Unit - (Entering unit) Takes damage)
          • -------- Fiend - Blood Lust End --------
          • -------- Destroyer - Break --------
          • Trigger - Add to Break <gen> the event (Unit - (Entering unit) Takes damage)
          • -------- Destroyer - Break End --------
          • -------- Rogue Sleep (Trap) --------
          • Trigger - Add to Rogue Strike Damage <gen> the event (Unit - (Entering unit) Takes damage)
          • -------- Rogue Sleep (Trap) End --------
          • -------- Repel --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Entering unit)) Equal to Stone Giant
            • Then - Actions
              • Trigger - Add to Repel <gen> the event (Unit - (Entering unit) Takes damage)
            • Else - Actions
              • Do nothing
          • -------- Repel End --------
          • -------- Treefolk Share Damage --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Entering unit)) Equal to Treefolk
            • Then - Actions
              • Trigger - Add to Treefolk Share Damage <gen> the event (Unit - (Entering unit) Takes damage)
            • Else - Actions
              • Do nothing
          • -------- Treefolk Share Damage End --------
          • -------- Merge --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Entering unit)) Equal to Treefolk Guardian
            • Then - Actions
              • Trigger - Add to Merge Damage <gen> the event (Unit - (Entering unit) Takes damage)
            • Else - Actions
              • Do nothing
          • -------- Merge End --------
          • -------- Dig --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Entering unit)) Equal to Hole (Dig)
            • Then - Actions
              • Trigger - Add to Dig FallIn <gen> the event (Unit - A unit comes within 60.00 of (Entering unit))
            • Else - Actions
              • Do nothing
          • -------- Dig End --------
          • -------- BondsOfPain --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Entering unit)) Equal to Witch Doctor (Hero)
            • Then - Actions
              • Trigger - Add to Bonds of Pain Dmg <gen> the event (Unit - (Entering unit) Takes damage)
            • Else - Actions
              • Do nothing
          • -------- BondsOfPain End --------
          • -------- Twin Blades --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Entering unit)) Equal to Axe
            • Then - Actions
              • Trigger - Add to TwinBlades Dmg <gen> the event (Unit - A unit comes within 65.00 of (Entering unit))
            • Else - Actions
              • Do nothing
          • -------- Twin Blades End --------
          • -------- Camouflage Damage --------
          • Trigger - Add to Camouflage Damage <gen> the event (Unit - (Entering unit) Takes damage)
          • -------- Camouflage Damage End --------
          • -------- Desperate Attack --------
          • Trigger - Add to KA Damage <gen> the event (Unit - (Entering unit) Takes damage)
          • -------- Desperate Attack End --------
          • -------- Bladedance Damage --------
          • Trigger - Add to Bladedance Damage <gen> the event (Unit - (Entering unit) Takes damage)
          • -------- Bladedance Damage End --------
          • -------- CamouflageEvade --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Entering unit)) Equal to Dark Troll Mercenary (Hero)
            • Then - Actions
              • Trigger - Add to Camouflage Evade <gen> the event (Unit - (Entering unit) Takes damage)
            • Else - Actions
              • Do nothing
          • -------- CamouflageEvade End --------
          • -------- Death Ward --------
          • Trigger - Add to Death Ward Damage <gen> the event (Unit - (Entering unit) Takes damage)
          • -------- Death Ward End --------
          • -------- Backstab --------
          • Trigger - Add to Backstab Damage <gen> the event (Unit - (Entering unit) Takes damage)
          • -------- Great Cleave --------
          • Trigger - Add to Great Cleave DMG <gen> the event (Unit - (Entering unit) Takes damage)
          • -------- Great Cleave End --------
          • -------- Fire Bolt --------
          • Trigger - Add to Fire Bolt Damage <gen> the event (Unit - (Entering unit) Takes damage)
          • -------- Fire Bolt End --------
          • -------- Transfigure --------
          • Trigger - Add to Transfigure Chain Poly <gen> the event (Unit - (Entering unit) Takes damage)
          • -------- Transfigure End --------
          • -------- Flock Dmg --------
          • Trigger - Add to Flock Damage <gen> the event (Unit - (Entering unit) Takes damage)
          • -------- Flock Dmg End --------
          • -------- Mongrel Spirit Damage --------
          • Trigger - Add to Mongrel Spirit Damage <gen> the event (Unit - (Entering unit) Takes damage)
          • -------- Mongrel Spirit Damage End --------
        • Else - Actions
          • Do nothing
      • -------- Raiders Chain-Link Damage --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Entering unit)) Equal to Hook
        • Then - Actions
          • Trigger - Add to Raiders Damage <gen> the event (Unit - A unit comes within 75.00 of (Entering unit))
        • Else - Actions
          • Do nothing
      • -------- Raiders Chain-Link Damage End --------
      • -------- Bladedance --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Entering unit)) Equal to Dummy Energy Shield Caster (Level 3)
        • Then - Actions
          • Trigger - Add to Bladedance Detect <gen> the event (Unit - A unit comes within 60.00 of (Entering unit))
        • Else - Actions
          • Do nothing
      • -------- Bladedance End --------
      • -------- Ignite Damage --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • ((Entering unit) is A ground unit) Equal to True
              • ((Entering unit) is A structure) Equal to True
        • Then - Actions
          • Trigger - Add to Ignite Damage <gen> the event (Unit - (Entering unit) Takes damage)
        • Else - Actions
          • Do nothing
      • -------- Ignite Damage End --------
      • -------- White Knight --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Entering unit)) Equal to White Knight (Hammer)
              • (Unit-type of (Entering unit)) Equal to White Knight (Main)
        • Then - Actions
          • -------- Penance --------
          • Trigger - Add to Penance <gen> the event (Unit - (Entering unit) Takes damage)
          • -------- Hand of Zeus --------
          • Trigger - Add to Zeus Damage <gen> the event (Unit - (Entering unit) Takes damage)
        • Else - Actions
          • Do nothing
      • -------- White Knight End --------
Any advice or help is appreciated.
 
Level 17
Joined
Jul 17, 2011
Messages
1,864
make it so that the heroes cant kill so many units?
the second trigger is very bad, it wont cause lag but you should remove the whole thing and redo it
the first trigger might cause lag if it is triggered very often but im not shure how often that is
for something like this where you are wondering if the triggers are causing lag all you have to do is copy the whole trigger on a new map and test it to see what happens
if it is causing severe lag (which i doubt) then remove some of the actions or just make it so that the hero cant kill so many units as i mentioned
 
Ender said:
for the second trigger (and all spells related to it) you should use Bribes GUI Damage Engine,
the second trigger is probably causing the lag, because of the 100's of events it will create over the course of a game.

Yes.
Also, the units that die don't get unregistered so you're going to have thousands and thousands of event registrations.

Bribe's Damage Engine destroys the trigger and recreates it every time 15 units registered to it die to avoid leaks and increase speed.
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
Thanks for the answer guys. I've downloaded the Damage engine and copied it to my map. So I have two question I need to ask.


1.) Since the engine only detects damage, how will i make this "(Unit - a unit comes within 60.00 of (entering unit))" work?

2.) After copying the damage engine and index trigger in, and added the event "Game - DamageEvent becomes Equal to 2.00" and "Game - DamageEvent becomes Equal to 1.00", the trigger still does not work. Is there something I'm missing? I don't fully understand this triggering, so I'm just following steps.
 
Status
Not open for further replies.
Top