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

Cannot find the source of lagging

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,103
Whenever any of the special events finishes, the game for every player start lagging (from little lags, to horrible lags, depending on how good their machine is). And I simply cannot find the source lag comes from.





  • Special Event 1
    • Events
      • Time - SE_Timer expires
    • Conditions
    • Actions
      • Set SE_CW_Int = Gates
      • Set Gates = 0
      • Trigger - Turn off Mission Init <gen>
      • Trigger - Turn off (This trigger)
      • Trigger - Turn off Music Commands <gen>
      • Trigger - Turn off Research Upgrade <gen>
      • Trigger - Turn off Creep Spawn <gen>
      • Trigger - Turn off Creep Spawn Move <gen>
      • Trigger - Turn on SE Pausing <gen>
      • Sound - Stop music Immediately
      • Sound - Play Pre___Special_Event <gen>
      • Countdown Timer - Pause SE_Timer
      • Countdown Timer - Hide SE_TimerWindow
      • Countdown Timer - Destroy SE_TimerWindow
      • Countdown Timer - Pause NextWave_Timer
      • Countdown Timer - Hide NextWave_TimerWindow
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Difficulty Equal to Hard
        • Then - Actions
          • Countdown Timer - Pause DragonWave_Timer
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Difficulty Equal to Extreme
            • Then - Actions
              • Countdown Timer - Pause DragonWave_Timer
            • Else - Actions
      • Game - Display to (All players) the text: |c00FDD017Special E...
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit - Pause (Picked unit)
      • Set TempUnitGroup = (Units in (Playable map area) matching ((((Matching unit) is A structure) Equal to False) and (((((Matching unit) is A Hero) Equal to True) and ((Unit-type of (Matching unit)) Not equal to Multiboard)) and ((((Matching unit) belongs to an ally of Player 1 (Re
      • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
        • Loop - Actions
          • For each (Integer TempInt) from 1 to 8, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Owner of (Picked unit)) Equal to Player[TempInt]
                • Then - Actions
                  • Set SE_Player[TempInt] = Player[TempInt]
                  • Set SE_Heroes[TempInt] = (Picked unit)
                  • Set SE_Heroes_Point[TempInt] = (Position of SE_Heroes[TempInt])
                  • Unit - Reset ability cooldowns for SE_Heroes[TempInt]
                • Else - Actions
      • Wait 5.00 game-time seconds
      • Set TempPoint = (Center of SE Blue <gen>)
      • Unit - Move SE_Heroes[1] instantly to TempPoint
      • Camera - Pan camera for SE_Player[1] to TempPoint over 0.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of SE Teal <gen>)
      • Unit - Move SE_Heroes[2] instantly to TempPoint
      • Camera - Pan camera for SE_Player[2] to TempPoint over 0.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of SE Purple <gen>)
      • Unit - Move SE_Heroes[3] instantly to TempPoint
      • Camera - Pan camera for SE_Player[3] to TempPoint over 0.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of SE Yellow <gen>)
      • Unit - Move SE_Heroes[4] instantly to TempPoint
      • Camera - Pan camera for SE_Player[4] to TempPoint over 0.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of SE Orange <gen>)
      • Unit - Move SE_Heroes[5] instantly to TempPoint
      • Camera - Pan camera for SE_Player[5] to TempPoint over 0.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of SE Pink <gen>)
      • Unit - Move SE_Heroes[6] instantly to TempPoint
      • Camera - Pan camera for SE_Player[6] to TempPoint over 0.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of SE Gray <gen>)
      • Unit - Move SE_Heroes[7] instantly to TempPoint
      • Camera - Pan camera for SE_Player[7] to TempPoint over 0.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of SE Light Blue <gen>)
      • Unit - Move SE_Heroes[8] instantly to TempPoint
      • Camera - Pan camera for SE_Player[8] to TempPoint over 0.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyGroup(udg_TempUnitGroup)
      • Custom script: set udg_TempPoint = null
      • Custom script: set udg_TempUnitGroup = null
      • For each (Integer TempInt) from 1 to 8, do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for Player[TempInt] emitting Visibility across SE <gen>
          • Set SE_Fog[TempInt] = (Last created visibility modifier)
          • Visibility - Enable SE_Fog[TempInt]
      • Wait 3.00 game-time seconds
      • Game - Display to (All players) the text: |c00FDD017Stay aliv...
      • Wait 4.00 game-time seconds
      • Game - Display to (All players) the text: |c00FDD017GO GO GO!
      • Sound - Stop music Immediately
      • Sound - Play Special_Event <gen>
      • For each (Integer TempInt) from 1 to 8, do (Actions)
        • Loop - Actions
          • Unit - Unpause SE_Heroes[TempInt]
      • Countdown Timer - Start SE_Timer as a One-shot timer that will expire in 120.00 seconds
      • Countdown Timer - Create a timer window for SE_Timer with title Countdown:
      • Set SE_TimerWindow = (Last created timer window)
      • Countdown Timer - Show SE_TimerWindow
      • Countdown Timer - Change the color of the title for SE_TimerWindow to (100.00%, 0.00%, 0.00%) with 0.00% transparency
      • Trigger - Turn on Special Event 1 Loop <gen>
      • Trigger - Turn on Special Event 1 End <gen>
      • Trigger - Turn on Special Event Leaving Area <gen>
      • Trigger - Run Explosion 1 <gen> (checking conditions)
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
  • Special Event 2
    • Events
      • Time - SE_Timer expires
    • Conditions
    • Actions
      • Set SE_CW_Int = Gates
      • Set Gates = 0
      • Trigger - Turn off Mission Init <gen>
      • Trigger - Turn off (This trigger)
      • Trigger - Turn off Music Commands <gen>
      • Trigger - Turn off Research Upgrade <gen>
      • Trigger - Turn off Creep Spawn <gen>
      • Trigger - Turn off Creep Spawn Move <gen>
      • Trigger - Turn on SE Pausing <gen>
      • Sound - Stop music Immediately
      • Sound - Play Pre___Special_Event <gen>
      • Countdown Timer - Pause SE_Timer
      • Countdown Timer - Hide SE_TimerWindow
      • Countdown Timer - Destroy SE_TimerWindow
      • Countdown Timer - Pause NextWave_Timer
      • Countdown Timer - Hide NextWave_TimerWindow
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Difficulty Equal to Hard
        • Then - Actions
          • Countdown Timer - Pause DragonWave_Timer
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Difficulty Equal to Extreme
            • Then - Actions
              • Countdown Timer - Pause DragonWave_Timer
            • Else - Actions
      • Game - Display to (All players) the text: |c00FDD017Special E...
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit - Pause (Picked unit)
      • Set TempUnitGroup = (Units in (Playable map area) matching ((((Matching unit) is A structure) Equal to False) and (((((Matching unit) is A Hero) Equal to True) and ((Unit-type of (Matching unit)) Not equal to Multiboard)) and ((((Matching unit) belongs to an ally of Player 1 (Re
      • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
        • Loop - Actions
          • For each (Integer TempInt) from 1 to 8, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Owner of (Picked unit)) Equal to Player[TempInt]
                • Then - Actions
                  • Set SE_Player[TempInt] = Player[TempInt]
                  • Set SE_Heroes[TempInt] = (Picked unit)
                  • Set SE_Heroes_Point[TempInt] = (Position of SE_Heroes[TempInt])
                  • Unit - Reset ability cooldowns for SE_Heroes[TempInt]
                • Else - Actions
      • Wait 5.00 game-time seconds
      • Set TempPoint = (Center of SE Blue <gen>)
      • Unit - Move SE_Heroes[1] instantly to TempPoint
      • Camera - Pan camera for SE_Player[1] to TempPoint over 0.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of SE Teal <gen>)
      • Unit - Move SE_Heroes[2] instantly to TempPoint
      • Camera - Pan camera for SE_Player[2] to TempPoint over 0.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of SE Purple <gen>)
      • Unit - Move SE_Heroes[3] instantly to TempPoint
      • Camera - Pan camera for SE_Player[3] to TempPoint over 0.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of SE Yellow <gen>)
      • Unit - Move SE_Heroes[4] instantly to TempPoint
      • Camera - Pan camera for SE_Player[4] to TempPoint over 0.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of SE Orange <gen>)
      • Unit - Move SE_Heroes[5] instantly to TempPoint
      • Camera - Pan camera for SE_Player[5] to TempPoint over 0.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of SE Pink <gen>)
      • Unit - Move SE_Heroes[6] instantly to TempPoint
      • Camera - Pan camera for SE_Player[6] to TempPoint over 0.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of SE Gray <gen>)
      • Unit - Move SE_Heroes[7] instantly to TempPoint
      • Camera - Pan camera for SE_Player[7] to TempPoint over 0.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of SE Light Blue <gen>)
      • Unit - Move SE_Heroes[8] instantly to TempPoint
      • Camera - Pan camera for SE_Player[8] to TempPoint over 0.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyGroup(udg_TempUnitGroup)
      • Custom script: set udg_TempPoint = null
      • Custom script: set udg_TempUnitGroup = null
      • For each (Integer TempInt) from 1 to 8, do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for Player[TempInt] emitting Visibility across SE <gen>
          • Set SE_Fog[TempInt] = (Last created visibility modifier)
          • Visibility - Enable SE_Fog[TempInt]
      • Wait 3.00 game-time seconds
      • Game - Display to (All players) the text: |c00FDD017Stay aliv...
      • Wait 4.00 game-time seconds
      • Game - Display to (All players) the text: |c00FDD017GO GO GO!
      • For each (Integer TempInt) from 1 to 8, do (Actions)
        • Loop - Actions
          • Unit - Unpause SE_Heroes[TempInt]
      • Sound - Stop music Immediately
      • Sound - Play Special_Event <gen>
      • Countdown Timer - Start SE_Timer as a One-shot timer that will expire in 120.00 seconds
      • Countdown Timer - Create a timer window for SE_Timer with title Countdown:
      • Set SE_TimerWindow = (Last created timer window)
      • Countdown Timer - Show SE_TimerWindow
      • Countdown Timer - Change the color of the title for SE_TimerWindow to (100.00%, 0.00%, 0.00%) with 0.00% transparency
      • Trigger - Turn on Special Event 2 Loop <gen>
      • Trigger - Turn on Special Event 2 End <gen>
      • Trigger - Run Explosion 2 <gen> (checking conditions)
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
  • Special Event 3
    • Events
      • Time - SE_Timer expires
    • Conditions
    • Actions
      • Set SE_CW_Int = Gates
      • Set Gates = 0
      • Trigger - Turn off Mission Init <gen>
      • Trigger - Turn off (This trigger)
      • Trigger - Turn off On Death <gen>
      • Trigger - Turn off Music Commands <gen>
      • Trigger - Turn off Research Upgrade <gen>
      • Trigger - Turn off Creep Spawn <gen>
      • Trigger - Turn off Creep Spawn Move <gen>
      • Trigger - Turn off Sell Resources <gen>
      • Trigger - Turn off Give Resources <gen>
      • Trigger - Turn on SE Pausing <gen>
      • Sound - Stop music Immediately
      • Sound - Play Pre___Special_Event <gen>
      • Countdown Timer - Pause SE_Timer
      • Countdown Timer - Hide SE_TimerWindow
      • Countdown Timer - Destroy SE_TimerWindow
      • Countdown Timer - Pause NextWave_Timer
      • Countdown Timer - Hide NextWave_TimerWindow
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Difficulty Equal to Hard
        • Then - Actions
          • Countdown Timer - Pause DragonWave_Timer
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Difficulty Equal to Extreme
            • Then - Actions
              • Countdown Timer - Pause DragonWave_Timer
            • Else - Actions
      • Game - Display to (All players) the text: |c00FDD017Special E...
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit - Pause (Picked unit)
      • Set SE_Region[1] = Special Event 3 Blue <gen>
      • Set SE_Region[2] = Special Event 3 Teal <gen>
      • Set SE_Region[3] = Special Event 3 Purple <gen>
      • Set SE_Region[4] = Special Event 3 Yellow <gen>
      • Set SE_Region[5] = Special Event 3 Orange <gen>
      • Set SE_Region[6] = Special Event 3 Green <gen>
      • Set SE_Region[7] = Special Event 3 Gray <gen>
      • Set SE_Region[8] = Special Event 3 Light Blue <gen>
      • Wait 5.00 game-time seconds
      • Set TempUnitGroup = (Units in (Playable map area) matching ((((Matching unit) is A structure) Equal to False) and (((((Matching unit) is A Hero) Equal to True) and ((Unit-type of (Matching unit)) Not equal to Multiboard)) and ((((Matching unit) belongs to an ally of Player 1 (Re
      • -------- ------------------------------------------------------------------------------------- --------
      • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
        • Loop - Actions
          • For each (Integer TempInt) from 1 to 8, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Owner of (Picked unit)) Equal to Player[TempInt]
                • Then - Actions
                  • Set SE_Player[TempInt] = Player[TempInt]
                  • Set SE_Heroes[TempInt] = (Picked unit)
                  • Set SE_Heroes_Point[TempInt] = (Position of SE_Heroes[TempInt])
                  • Set TempPoint = (Center of SE_Region[TempInt])
                  • Unit - Move SE_Heroes[TempInt] instantly to TempPoint
                  • Unit - Reset ability cooldowns for SE_Heroes[TempInt]
                  • Camera - Pan camera for Player[TempInt] to TempPoint over 0.00 seconds
                  • Unit - Create 15 Corrupted Revenant (Special Event 3) for Player 12 (Brown) at TempPoint facing (Facing of SE_Heroes[TempInt]) degrees
                  • Custom script: call RemoveLocation(udg_TempPoint)
                • Else - Actions
      • Trigger - Turn on Special Event 3 Revenant <gen>
      • Custom script: call DestroyGroup(udg_TempUnitGroup)
      • Custom script: set udg_TempPoint = null
      • Custom script: set udg_TempUnitGroup = null
      • For each (Integer TempInt) from 1 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (SE_Player[TempInt] slot status) Equal to Is playing
            • Then - Actions
              • Visibility - Create an initially Enabled visibility modifier for SE_Player[TempInt] emitting Visibility across SE_Region[TempInt]
              • Set SE_Fog[TempInt] = (Last created visibility modifier)
              • Visibility - Enable SE_Fog[TempInt]
            • Else - Actions
      • Game - Display to (All players) the text: |c00FDD017Kill as m...
      • Game - Display to (All players) the text: |c00FDD017Exchangin...
      • Game - Display to (All players) the text: |c00FDD017NOTE: You...
      • Wait 5.00 game-time seconds
      • For each (Integer TempInt) from 1 to 8, do (Actions)
        • Loop - Actions
          • Unit - Unpause SE_Heroes[TempInt]
      • Sound - Stop music Immediately
      • Sound - Play Special_Event <gen>
      • Countdown Timer - Start SE_Timer as a One-shot timer that will expire in 120.00 seconds
      • Countdown Timer - Create a timer window for SE_Timer with title Countdown:
      • Set SE_TimerWindow = (Last created timer window)
      • Countdown Timer - Show SE_TimerWindow
      • Countdown Timer - Change the color of the title for SE_TimerWindow to (100.00%, 0.00%, 0.00%) with 0.00% transparency
      • Trigger - Turn on Special Event 3 End <gen>
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())




  • Special Event 1 End
    • Events
      • Time - SE_Timer expires
    • Conditions
    • Actions
      • Trigger - Turn on Mission Init <gen>
      • Trigger - Turn off (This trigger)
      • Trigger - Turn off Special Event 1 Loop <gen>
      • Trigger - Turn on Music Commands <gen>
      • Trigger - Turn on Research Upgrade <gen>
      • Trigger - Turn on Creep Spawn <gen>
      • Trigger - Turn on Creep Spawn Move <gen>
      • Trigger - Turn off SE Pausing <gen>
      • Countdown Timer - Pause SE_Timer
      • Countdown Timer - Hide SE_TimerWindow
      • Countdown Timer - Destroy SE_TimerWindow
      • Game - Display to (All players) the text: |c00FDD017Time's up...
      • Sound - Stop music Immediately
      • Sound - Play Pre___Special_Event <gen>
      • Wait 5.00 game-time seconds
      • For each (Integer TempInt) from 1 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (SE <gen> contains SE_Heroes[TempInt]) Equal to True
            • Then - Actions
              • Set TempPlayerGroup = (Player group(SE_Player[TempInt]))
              • Game - Display to TempPlayerGroup the text: |c00FDD017Congratul...
              • Game - Display to TempPlayerGroup the text: |cff00ffff50 000|r ...
              • Game - Display to TempPlayerGroup the text: |cff00ffff100|r |c0...
              • Player - Add 50000 to SE_Player[TempInt] Current gold
              • Hero - Modify Strength of SE_Heroes[TempInt]: Add 100
              • Hero - Modify Agility of SE_Heroes[TempInt]: Add 100
              • Hero - Modify Intelligence of SE_Heroes[TempInt]: Add 100
              • Special Effect - Create a special effect attached to the origin of SE_Heroes[TempInt] using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • Custom script: call DestroyForce(udg_TempPlayerGroup)
            • Else - Actions
      • Custom script: set udg_TempPlayerGroup = null
      • Wait 5.00 game-time seconds
      • For each (Integer TempInt) from 1 to 8, do (Actions)
        • Loop - Actions
          • Set SE_Death[TempInt] = False
          • Unit - Move SE_Heroes[TempInt] instantly to SE_Heroes_Point[TempInt]
          • Unit - Reset ability cooldowns for SE_Heroes[TempInt]
          • Unit - Make SE_Heroes[TempInt] Vulnerable
          • Camera - Pan camera for SE_Player[TempInt] to SE_Heroes_Point[TempInt] over 0.00 seconds
          • Visibility - Disable SE_Fog[TempInt]
          • Visibility - Destroy SE_Fog[TempInt]
          • Custom script: call RemoveLocation(udg_SE_Heroes_Point[udg_TempInt])
          • Custom script: set udg_SE_Heroes_Point[udg_TempInt] = null
          • Custom script: set udg_SE_Heroes[udg_TempInt] = null
          • Custom script: set udg_SE_Player[udg_TempInt] = null
      • Sound - Stop music Immediately
      • Sound - Play Game_Music <gen>
      • Countdown Timer - Start SE_Timer as a One-shot timer that will expire in (SpecialEvent_Time - 120.00) seconds
      • Countdown Timer - Create a timer window for SE_Timer with title Special Event:
      • Set SE_TimerWindow = (Last created timer window)
      • Countdown Timer - Show SE_TimerWindow
      • Countdown Timer - Change the color of the title for SE_TimerWindow to (100.00%, 0.00%, 0.00%) with 0.00% transparency
      • Countdown Timer - Resume NextWave_Timer
      • Countdown Timer - Show NextWave_TimerWindow
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Difficulty Equal to Hard
        • Then - Actions
          • Countdown Timer - Resume DragonWave_Timer
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Difficulty Equal to Extreme
            • Then - Actions
              • Countdown Timer - Resume DragonWave_Timer
            • Else - Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit - Unpause (Picked unit)
      • Set Gates = SE_CW_Int
      • Set SE_CW_Int = 0
      • Trigger - Turn on Special Event 2 <gen>
      • Custom script: call DestroyTrigger(gg_trg_Explosion_1)
      • Custom script: call DestroyTrigger(gg_trg_Special_Event_1)
      • Custom script: call DestroyTrigger(gg_trg_Special_Event_1_Loop)
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
  • Special Event 2 End
    • Events
      • Time - SE_Timer expires
    • Conditions
    • Actions
      • Trigger - Turn on Mission Init <gen>
      • Trigger - Turn off (This trigger)
      • Trigger - Turn off Special Event 2 Loop <gen>
      • Trigger - Turn on Music Commands <gen>
      • Trigger - Turn on Research Upgrade <gen>
      • Trigger - Turn on Creep Spawn <gen>
      • Trigger - Turn on Creep Spawn Move <gen>
      • Trigger - Turn off SE Pausing <gen>
      • Countdown Timer - Pause SE_Timer
      • Countdown Timer - Hide SE_TimerWindow
      • Countdown Timer - Destroy SE_TimerWindow
      • Game - Display to (All players) the text: |c00FDD017Time's up...
      • Sound - Stop music Immediately
      • Sound - Play Pre___Special_Event <gen>
      • Wait 5.00 game-time seconds
      • For each (Integer TempInt) from 1 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (SE <gen> contains SE_Heroes[TempInt]) Equal to True
            • Then - Actions
              • Set TempPlayerGroup = (Player group(SE_Player[TempInt]))
              • Game - Display to TempPlayerGroup the text: |c00FDD017Congratul...
              • Game - Display to TempPlayerGroup the text: |cff00ffff100 000|r...
              • Game - Display to TempPlayerGroup the text: |cff00ffff500|r |c...
              • Game - Display to TempPlayerGroup the text: |cff00ffff100|r |c0...
              • Player - Add 100000 to SE_Player[TempInt] Current gold
              • Player - Add 500 to SE_Player[TempInt] Current lumber
              • Hero - Modify Strength of SE_Heroes[TempInt]: Add 250
              • Hero - Modify Agility of SE_Heroes[TempInt]: Add 250
              • Hero - Modify Intelligence of SE_Heroes[TempInt]: Add 250
              • Special Effect - Create a special effect attached to the origin of SE_Heroes[TempInt] using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • Custom script: call DestroyForce(udg_TempPlayerGroup)
            • Else - Actions
      • Custom script: set udg_TempPlayerGroup = null
      • Wait 5.00 game-time seconds
      • For each (Integer TempInt) from 1 to 8, do (Actions)
        • Loop - Actions
          • Set SE_Death[TempInt] = False
          • Unit - Move SE_Heroes[TempInt] instantly to SE_Heroes_Point[TempInt]
          • Unit - Reset ability cooldowns for SE_Heroes[TempInt]
          • Unit - Make SE_Heroes[TempInt] Vulnerable
          • Camera - Pan camera for SE_Player[TempInt] to SE_Heroes_Point[TempInt] over 0.00 seconds
          • Visibility - Disable SE_Fog[TempInt]
          • Visibility - Destroy SE_Fog[TempInt]
          • Custom script: call RemoveLocation(udg_SE_Heroes_Point[udg_TempInt])
          • Custom script: set udg_SE_Heroes_Point[udg_TempInt] = null
          • Custom script: set udg_SE_Heroes[udg_TempInt] = null
          • Custom script: set udg_SE_Player[udg_TempInt] = null
      • Sound - Stop music Immediately
      • Sound - Play Game_Music <gen>
      • Countdown Timer - Start SE_Timer as a One-shot timer that will expire in (SpecialEvent_Time - 240.00) seconds
      • Countdown Timer - Create a timer window for SE_Timer with title Special Event:
      • Set SE_TimerWindow = (Last created timer window)
      • Countdown Timer - Show SE_TimerWindow
      • Countdown Timer - Change the color of the title for SE_TimerWindow to (100.00%, 0.00%, 0.00%) with 0.00% transparency
      • Countdown Timer - Resume NextWave_Timer
      • Countdown Timer - Show NextWave_TimerWindow
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Difficulty Equal to Hard
        • Then - Actions
          • Countdown Timer - Resume DragonWave_Timer
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Difficulty Equal to Extreme
            • Then - Actions
              • Countdown Timer - Resume DragonWave_Timer
            • Else - Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit - Unpause (Picked unit)
      • Set Gates = SE_CW_Int
      • Set SE_CW_Int = 0
      • Trigger - Turn on Special Event 3 <gen>
      • Custom script: call DestroyTrigger(gg_trg_Special_Event_2_Loop)
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
  • Special Event 3 End
    • Events
      • Time - SE_Timer expires
    • Conditions
    • Actions
      • Trigger - Turn on Mission Init <gen>
      • Trigger - Turn off (This trigger)
      • Trigger - Turn off Special Event 3 Revenant <gen>
      • Trigger - Turn off Special Event Leaving Area <gen>
      • Trigger - Turn off SE Pausing <gen>
      • Trigger - Turn on Research Upgrade <gen>
      • Trigger - Turn on Creep Spawn <gen>
      • Trigger - Turn on Creep Spawn Move <gen>
      • Trigger - Turn on Music Commands <gen>
      • Trigger - Turn on Sell Resources <gen>
      • Trigger - Turn on Give Resources <gen>
      • Countdown Timer - Pause SE_Timer
      • Countdown Timer - Hide SE_TimerWindow
      • Countdown Timer - Destroy SE_TimerWindow
      • Game - Display to (All players) the text: |c00FDD017Time's up...
      • Sound - Stop music Immediately
      • Wait 5.00 game-time seconds
      • For each (Integer TempInt2) from 1 to 8, do (Actions)
        • Loop - Actions
          • Unit - Move SE_Heroes[TempInt2] instantly to SE_Heroes_Point[TempInt2]
          • Unit - Reset ability cooldowns for SE_Heroes[TempInt2]
          • Unit - Make SE_Heroes[TempInt2] Vulnerable
          • Camera - Pan camera for SE_Player[TempInt2] to SE_Heroes_Point[TempInt2] over 0.00 seconds
          • Visibility - Disable SE_Fog[TempInt2]
          • Visibility - Destroy SE_Fog[TempInt2]
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units in SE_Region[TempInt2]) and do (Actions)
            • Loop - Actions
              • Unit - Kill (Picked unit)
          • Set SE_Region[TempInt2] = No region
          • Custom script: call RemoveLocation(udg_SE_Heroes_Point[udg_TempInt2])
          • Custom script: set udg_SE_Heroes_Point[udg_TempInt2] = null
          • Custom script: set udg_SE_Heroes[udg_TempInt2] = null
          • Custom script: set udg_SE_Player[udg_TempInt2] = null
      • Sound - Play Game_Music <gen>
      • Countdown Timer - Resume NextWave_Timer
      • Countdown Timer - Show NextWave_TimerWindow
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Difficulty Equal to Hard
        • Then - Actions
          • Countdown Timer - Resume DragonWave_Timer
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Difficulty Equal to Extreme
            • Then - Actions
              • Countdown Timer - Resume DragonWave_Timer
            • Else - Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit - Unpause (Picked unit)
      • Set Gates = SE_CW_Int
      • Set SE_CW_Int = 0
      • Custom script: call DestroyTrigger(gg_trg_Special_Event_3_Revenant)
      • Custom script: call DestroyTrigger(gg_trg_Special_Event_3_Revenant_Loop)
      • Custom script: call DestroyTrigger(gg_trg_Special_Event_Leaving_Area)
      • Custom script: call DestroyTrigger(gg_trg_SE_Pausing)
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())




  • SE Pausing
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Se Pausing <gen> contains TempUnit) Equal to True
                  • (SE Blue Pausing <gen> contains TempUnit) Equal to True
                  • (SE Teal Pausing <gen> contains TempUnit) Equal to True
                  • (SE Purple Pausing <gen> contains TempUnit) Equal to True
                  • (SE Yellow Pausing <gen> contains TempUnit) Equal to True
                  • (SE Orange Pausing <gen> contains TempUnit) Equal to True
                  • (SE Green Pausing <gen> contains TempUnit) Equal to True
                  • (SE Gray Pausing <gen> contains TempUnit) Equal to True
                  • (SE Light Blue Pausing <gen> contains TempUnit) Equal to True
            • Then - Actions
            • Else - Actions
              • Unit - Pause TempUnit
  • Special Event Leaving Area
    • Events
      • Unit - A unit leaves SE <gen>
    • Conditions
    • Actions
      • For each (Integer TempInt) from 1 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Triggering unit) Equal to SE_Heroes[TempInt]
            • Then - Actions
              • Set TempPoint = (Center of SE <gen>)
              • Set TempPlayerGroup = (Player group(SE_Player[TempInt]))
              • -------- ------------------------------------------------------------------------------------- --------
              • Unit - Move SE_Heroes[TempInt] instantly to TempPoint
              • Camera - Pan camera for SE_Player[TempInt] to TempPoint over 0.00 seconds
              • Game - Display to TempPlayerGroup the text: |cFFFF0000Do not le...
              • -------- ------------------------------------------------------------------------------------- --------
              • Custom script: call RemoveLocation(udg_TempPoint)
              • Custom script: call DestroyForce(udg_TempPlayerGroup)
              • -------- ------------------------------------------------------------------------------------- --------
            • Else - Actions
      • -------- ------------------------------------------------------------------------------------- --------
      • Custom script: set udg_TempPoint = null
      • Custom script: set udg_TempPlayerGroup = null
      • -------- ------------------------------------------------------------------------------------- --------
  • Special Event 1 Loop
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • -------- ------------------------------------------------------------------------------------- --------
      • Set TempUnitGroup = (Units in SE <gen> matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) has buff Speed Run (Illusionist)) Not equal to True)) and ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an enemy of Player
      • Set TempUnitGroup2 = (Random 1 units from TempUnitGroup)
      • -------- ------------------------------------------------------------------------------------- --------
      • Unit Group - Pick every unit in TempUnitGroup2 and do (Actions)
        • Loop - Actions
          • Set SE_Point = (Position of (Picked unit))
      • -------- ------------------------------------------------------------------------------------- --------
      • Trigger - Run Explosion 1 <gen> (checking conditions)
      • -------- ------------------------------------------------------------------------------------- --------
      • Custom script: call DestroyGroup(udg_TempUnitGroup)
      • Custom script: call DestroyGroup(udg_TempUnitGroup2)
      • -------- ------------------------------------------------------------------------------------- --------


  • Special Event 2 Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • -------- ------------------------------------------------------------------------------------- --------
      • Set TempUnitGroup = (Units in SE <gen> matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) has buff Speed Run (Illusionist)) Not equal to True)) and ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an enemy of Player
      • Set TempUnitGroup2 = (Random 1 units from TempUnitGroup)
      • -------- ------------------------------------------------------------------------------------- --------
      • Unit Group - Pick every unit in TempUnitGroup2 and do (Actions)
        • Loop - Actions
          • Set SE_Point = (Position of (Picked unit))
      • -------- ------------------------------------------------------------------------------------- --------
      • Trigger - Run Explosion 2 <gen> (checking conditions)
      • -------- ------------------------------------------------------------------------------------- --------
      • Custom script: call DestroyGroup(udg_TempUnitGroup)
      • Custom script: call DestroyGroup(udg_TempUnitGroup2)
      • -------- ------------------------------------------------------------------------------------- --------
  • Special Event 3 Revenant
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Corrupted Revenant (Special Event 3)
    • Actions
      • -------- ------------------------------------------------------------------------------------- --------
      • Set CR_MaxIndex = (CR_MaxIndex + 1)
      • Set CR_KillingUnit[CR_MaxIndex] = (Killing unit)
      • Set CR_Unit[CR_MaxIndex] = (Dying unit)
      • Set CR_Time[CR_MaxIndex] = 0.06
      • -------- ------------------------------------------------------------------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CR_MaxIndex Equal to 1
        • Then - Actions
          • Trigger - Turn on Special Event 3 Revenant Loop <gen>
        • Else - Actions
      • -------- ------------------------------------------------------------------------------------- --------
  • Special Event 3 Revenant Loop
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • -------- ------------------------------------------------------------------------------------- --------
      • For each (Integer CR_Loop) from 1 to CR_MaxIndex, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CR_Time[CR_Loop] Less than or equal to 0.00
            • Then - Actions
              • -------- ------------------------------------------------------------------------------------- --------
              • Unit - Remove CR_Unit[CR_Loop] from the game
              • -------- ------------------------------------------------------------------------------------- --------
              • Set TempPoint = (Position of CR_Unit[CR_Loop])
              • Unit - Create 1 (Unit-type of CR_Unit[CR_Loop]) for Player 12 (Brown) at TempPoint facing (Facing of CR_KillingUnit[CR_Loop]) degrees
              • -------- ------------------------------------------------------------------------------------- --------
              • Custom script: call RemoveLocation(udg_TempPoint)
              • -------- ------------------------------------------------------------------------------------- --------
              • Set CR_Unit[CR_Loop] = CR_Unit[CR_MaxIndex]
              • Set CR_Unit[CR_MaxIndex] = No unit
              • Set CR_KillingUnit[CR_Loop] = CR_KillingUnit[CR_MaxIndex]
              • Set CR_KillingUnit[CR_MaxIndex] = No unit
              • Set CR_Time[CR_Loop] = CR_Time[CR_MaxIndex]
              • Set CR_MaxIndex = (CR_MaxIndex - 1)
              • Set CR_Loop = (CR_Loop - 1)
              • -------- ------------------------------------------------------------------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CR_MaxIndex Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
              • -------- ------------------------------------------------------------------------------------- --------
            • Else - Actions
              • -------- ------------------------------------------------------------------------------------- --------
              • Set CR_Time[CR_Loop] = (CR_Time[CR_Loop] - 0.01)
              • -------- ------------------------------------------------------------------------------------- --------
      • -------- ------------------------------------------------------------------------------------- --------




End of Events triggers.



  • Creep Spawn
    • Events
    • Conditions
    • Actions
      • For each (Integer CreepSpawn_Loop) from 1 to Gates, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Palitic[CreepSpawn_Loop] is dead) Not equal to True
            • Then - Actions
              • -------- ====== Easy ====== --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Difficulty Equal to Easy
                • Then - Actions
                  • -------- ====== Looping To Creep Wave ====== --------
                  • For each (Integer CreepSpawn_Loop2) from 1 to 4, do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • CreepWave Equal to CreepSpawn_Loop2
                        • Then - Actions
                          • -------- ====== Creating Enemies ====== --------
                          • Unit - Create 3 Creeps1[CreepSpawn_Loop2] for Player 12 (Brown) at CreepSpawnPoint[CreepSpawn_Loop] facing Default building facing degrees
                          • Unit - Create 1 Creeps2[CreepSpawn_Loop2] for Player 11 (Dark Green) at CreepSpawnPoint[CreepSpawn_Loop] facing Default building facing degrees
                          • Unit - Create 2 Creeps3[CreepSpawn_Loop2] for Player 12 (Brown) at CreepSpawnPoint[CreepSpawn_Loop] facing Default building facing degrees
                          • Unit - Create 2 Creeps4[CreepSpawn_Loop2] for Player 11 (Dark Green) at CreepSpawnPoint[CreepSpawn_Loop] facing Default building facing degrees
                        • Else - Actions
                • Else - Actions
                  • -------- ====== Normal ====== --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Difficulty Equal to Normal
                    • Then - Actions
                      • -------- ====== Looping To Creep Wave ====== --------
                      • For each (Integer CreepSpawn_Loop2) from 1 to 4, do (Actions)
                        • Loop - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • CreepWave Equal to CreepSpawn_Loop2
                            • Then - Actions
                              • -------- ====== Creating Enemies ====== --------
                              • Unit - Create 3 Creeps1[CreepSpawn_Loop2] for Player 12 (Brown) at CreepSpawnPoint[CreepSpawn_Loop] facing Default building facing degrees
                              • Unit - Create 1 Creeps2[CreepSpawn_Loop2] for Player 11 (Dark Green) at CreepSpawnPoint[CreepSpawn_Loop] facing Default building facing degrees
                              • Unit - Create 2 Creeps3[CreepSpawn_Loop2] for Player 12 (Brown) at CreepSpawnPoint[CreepSpawn_Loop] facing Default building facing degrees
                              • Unit - Create 2 Creeps4[CreepSpawn_Loop2] for Player 11 (Dark Green) at CreepSpawnPoint[CreepSpawn_Loop] facing Default building facing degrees
                              • Unit - Create 1 EnemyHeroType[CreepSpawn_Loop2] for Player 11 (Dark Green) at CreepSpawnPoint[CreepSpawn_Loop] facing Default building facing degrees
                              • Set TempUnit = (Last created unit)
                              • -------- ======Hero Lvl ====== --------
                              • Hero - Set TempUnit Hero-level to (EnemyUpgrade + 1), Hide level-up graphics
                              • Hero - Modify unspent skill points of TempUnit: Add (EnemyUpgrade + 2) points
                              • -------- ======Hero Ability Add ====== --------
                              • Unit - Add EnemyHero_Abilities[CreepSpawn_Loop2] to TempUnit
                              • Unit - Add EnemyHero_Abilities2[CreepSpawn_Loop2] to TempUnit
                              • -------- ======Hero Ability Level ====== --------
                              • Unit - Set level of EnemyHero_Abilities[CreepSpawn_Loop2] for TempUnit to (EnemyUpgrade + 1)
                              • Unit - Set level of EnemyHero_Abilities2[CreepSpawn_Loop2] for TempUnit to (EnemyUpgrade + 1)
                              • -------- ======Hero Ability Order ====== --------
                              • If (CreepWave Equal to 1) then do (Unit - Order TempUnit to Night Elf Priestess Of The Moon - Activate Searing Arrows) else do (Do nothing)
                              • If (CreepWave Equal to 2) then do (Unit - Order TempUnit to Night Elf Demon Hunter - Activate Immolation) else do (Do nothing)
                              • -------- ======Hero Attributes ====== --------
                              • Hero - Modify Strength of TempUnit: Add (EnemyUpgrade x 100)
                              • Hero - Modify Agility of TempUnit: Add (EnemyUpgrade x 100)
                              • Hero - Modify Intelligence of TempUnit: Add (EnemyUpgrade x 100)
                            • Else - Actions
                    • Else - Actions
                      • -------- ====== Hard ====== --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Difficulty Equal to Hard
                        • Then - Actions
                          • -------- ====== Looping To Creep Wave ====== --------
                          • For each (Integer CreepSpawn_Loop2) from 1 to 4, do (Actions)
                            • Loop - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • CreepWave Equal to CreepSpawn_Loop2
                                • Then - Actions
                                  • -------- ====== Creating Enemies ====== --------
                                  • Unit - Create 3 Creeps1[CreepSpawn_Loop2] for Player 12 (Brown) at CreepSpawnPoint[CreepSpawn_Loop] facing Default building facing degrees
                                  • Unit - Create 1 Creeps2[CreepSpawn_Loop2] for Player 11 (Dark Green) at CreepSpawnPoint[CreepSpawn_Loop] facing Default building facing degrees
                                  • Unit - Create 2 Creeps3[CreepSpawn_Loop2] for Player 12 (Brown) at CreepSpawnPoint[CreepSpawn_Loop] facing Default building facing degrees
                                  • Unit - Create 2 Creeps4[CreepSpawn_Loop2] for Player 11 (Dark Green) at CreepSpawnPoint[CreepSpawn_Loop] facing Default building facing degrees
                                  • Unit - Create 1 EnemyHeroType[CreepSpawn_Loop2] for Player 11 (Dark Green) at CreepSpawnPoint[CreepSpawn_Loop] facing Default building facing degrees
                                  • Set TempUnit = (Last created unit)
                                  • -------- ======Hero Lvl ====== --------
                                  • Hero - Set TempUnit Hero-level to (EnemyUpgrade + 1), Hide level-up graphics
                                  • Hero - Modify unspent skill points of TempUnit: Add (EnemyUpgrade + 2) points
                                  • -------- ======Hero Ability Add ====== --------
                                  • Unit - Add EnemyHero_Abilities[CreepSpawn_Loop2] to TempUnit
                                  • Unit - Add EnemyHero_Abilities2[CreepSpawn_Loop2] to TempUnit
                                  • -------- ======Hero Ability Level ====== --------
                                  • Unit - Set level of EnemyHero_Abilities[CreepSpawn_Loop2] for TempUnit to (EnemyUpgrade + 1)
                                  • Unit - Set level of EnemyHero_Abilities2[CreepSpawn_Loop2] for TempUnit to (EnemyUpgrade + 1)
                                  • -------- ======Hero Ability Order ====== --------
                                  • If (CreepWave Equal to 1) then do (Unit - Order TempUnit to Night Elf Priestess Of The Moon - Activate Searing Arrows) else do (Do nothing)
                                  • If (CreepWave Equal to 2) then do (Unit - Order TempUnit to Night Elf Demon Hunter - Activate Immolation) else do (Do nothing)
                                  • -------- ======Hero Attributes ====== --------
                                  • Hero - Modify Strength of TempUnit: Add (EnemyUpgrade x 200)
                                  • Hero - Modify Agility of TempUnit: Add (EnemyUpgrade x 200)
                                  • Hero - Modify Intelligence of TempUnit: Add (EnemyUpgrade x 200)
                                • Else - Actions
                        • Else - Actions
                          • -------- ====== Extreme ====== --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Difficulty Equal to Extreme
                            • Then - Actions
                              • -------- ====== Looping To Creep Wave ====== --------
                              • For each (Integer CreepSpawn_Loop2) from 1 to 4, do (Actions)
                                • Loop - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • CreepWave Equal to CreepSpawn_Loop2
                                    • Then - Actions
                                      • -------- ====== Creating Enemies ====== --------
                                      • Unit - Create 3 Creeps1[CreepSpawn_Loop2] for Player 12 (Brown) at CreepSpawnPoint[CreepSpawn_Loop] facing Default building facing degrees
                                      • Unit - Create 1 Creeps2[CreepSpawn_Loop2] for Player 11 (Dark Green) at CreepSpawnPoint[CreepSpawn_Loop] facing Default building facing degrees
                                      • Unit - Create 2 Creeps3[CreepSpawn_Loop2] for Player 12 (Brown) at CreepSpawnPoint[CreepSpawn_Loop] facing Default building facing degrees
                                      • Unit - Create 2 Creeps4[CreepSpawn_Loop2] for Player 11 (Dark Green) at CreepSpawnPoint[CreepSpawn_Loop] facing Default building facing degrees
                                      • Unit - Create 1 EnemyHeroType[CreepSpawn_Loop2] for Player 11 (Dark Green) at CreepSpawnPoint[CreepSpawn_Loop] facing Default building facing degrees
                                      • Set TempUnit = (Last created unit)
                                      • -------- ======Hero Lvl ====== --------
                                      • Hero - Set TempUnit Hero-level to (EnemyUpgrade + 1), Hide level-up graphics
                                      • Hero - Modify unspent skill points of TempUnit: Add (EnemyUpgrade + 2) points
                                      • -------- ======Hero Ability Add ====== --------
                                      • Unit - Add EnemyHero_Abilities[CreepSpawn_Loop2] to TempUnit
                                      • Unit - Add EnemyHero_Abilities2[CreepSpawn_Loop2] to TempUnit
                                      • -------- ======Hero Ability Level ====== --------
                                      • Unit - Set level of EnemyHero_Abilities[CreepSpawn_Loop2] for TempUnit to (EnemyUpgrade + 1)
                                      • Unit - Set level of EnemyHero_Abilities2[CreepSpawn_Loop2] for TempUnit to (EnemyUpgrade + 1)
                                      • -------- ======Hero Ability Order ====== --------
                                      • If (CreepWave Equal to 1) then do (Unit - Order TempUnit to Night Elf Priestess Of The Moon - Activate Searing Arrows) else do (Do nothing)
                                      • If (CreepWave Equal to 2) then do (Unit - Order TempUnit to Night Elf Demon Hunter - Activate Immolation) else do (Do nothing)
                                      • -------- ======Hero Attributes ====== --------
                                      • Hero - Modify Strength of TempUnit: Add (EnemyUpgrade x 300)
                                      • Hero - Modify Agility of TempUnit: Add (EnemyUpgrade x 300)
                                      • Hero - Modify Intelligence of TempUnit: Add (EnemyUpgrade x 300)
                                    • Else - Actions
                            • Else - Actions
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CreepWave Equal to 4
        • Then - Actions
          • Set CreepWave = 1
        • Else - Actions
          • Set CreepWave = (CreepWave + 1)
  • Creep Spawn Move
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Actions
      • Set TempPoint = (Center of Starting Area <gen>)
      • For each (Integer TempInt) from 1 to Gates, do (Actions)
        • Loop - Actions
          • -------- ====== Attack Order ====== --------
          • Set TempUnitGroup = (Units within 600.00 of CreepSpawnPoint[TempInt] matching ((((Matching unit) is A structure) Not equal to True) and (((Matching unit) belongs to an enemy of Player 1 (Red)) Equal to True)))
          • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Current order of (Picked unit)) Equal to (Order(attack))
                      • (Current order of (Picked unit)) Equal to (Order(move))
                      • (Current order of (Picked unit)) Equal to (Order(smart))
                • Then - Actions
                • Else - Actions
                  • Unit - Order (Picked unit) to Attack-Move To TempPoint
          • Custom script: call DestroyGroup(udg_TempUnitGroup)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: set udg_TempPoint = null
      • Custom script: set udg_TempUnitGroup = null


End of Creeps triggers.



  • Music Commands
    • Events
    • Conditions
      • (Substring((Entered chat string), 1, 7)) Equal to -music
    • Actions
      • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
      • -------- ========== Human Music ========== --------
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to human1) then do (Sound - Play Human 1) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to human2) then do (Sound - Play Human 2) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to human3) then do (Sound - Play Human 3) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to humanX1) then do (Sound - Play Human X1) else do (Do nothing)
      • -------- ========== NightElf Music ========== --------
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to nightelf1) then do (Sound - Play Night Elf 1) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to nightelf2) then do (Sound - Play Night Elf 2) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to nightelf3) then do (Sound - Play Night Elf 3) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to nightelfX1) then do (Sound - Play Night Elf X1) else do (Do nothing)
      • -------- ========== Orc Music ========== --------
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to orc1) then do (Sound - Play Orc 1) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to orc2) then do (Sound - Play Orc 2) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to orc3) then do (Sound - Play Orc 3) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to orcX1) then do (Sound - Play Orc X1) else do (Do nothing)
      • -------- ========== Undead Music ========== --------
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to undead1) then do (Sound - Play Undead 1) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to undead2) then do (Sound - Play Undead 2) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to undead3) then do (Sound - Play Undead 3) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to undeadX1) then do (Sound - Play Undead X1) else do (Do nothing)
      • -------- ========== Music Special ========== --------
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to special1) then do (Sound - Play war3mapImported\Hero Selection.mp3) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to special2) then do (Sound - Play war3mapImported\Next Wave Alert.mp3) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to special3) then do (Sound - Play war3mapImported\Orbital Strike.mp3) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to special4) then do (Sound - Play war3mapImported\Respawn.mp3) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to special5) then do (Sound - Play war3mapImported\Game Music.mp3) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to special6) then do (Sound - Play war3mapImported\Pre - Special Event.mp3) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to special7) then do (Sound - Play war3mapImported\Special Event.mp3) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to special8) then do (Sound - Play war3mapImported\Final Wave Countdown.mp3) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to special9) then do (Sound - Play war3mapImported\MissionChallenge_Completed.mp3) else do (Do nothing)
      • -------- ========== Other Music ========== --------
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to other1) then do (Sound - Play Arthas' Theme) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to other2) then do (Sound - Play Blood Elf Theme) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to other3) then do (Sound - Play Comradeship) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to other4) then do (Sound - Play Credits) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to other5) then do (Sound - Play Dark Agents) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to other6) then do (Sound - Play Dark Victory) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to other7) then do (Sound - Play Doom) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to other8) then do (Sound - Play Heroic Victory) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to other9) then do (Sound - Play Illidan's Theme) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to other10) then do (Sound - Play Lich King's Theme) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to other11) then do (Sound - Play Naga Theme) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to other12) then do (Sound - Play Pursuit) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to other13) then do (Sound - Play Sad Mystery) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to other14) then do (Sound - Play Tension) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to other15) then do (Sound - Play Tragic Confrontation) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to other16) then do (Sound - Play Orc Victory) else do (Do nothing)
      • If ((Substring((Entered chat string), 8, (Length of (Entered chat string)))) Equal to other17) then do (Sound - Play Human Victory) else do (Do nothing)
      • Custom script: endif
  • Research Upgrade
    • Events
      • Time - Every 485.00 seconds of game time
    • Conditions
    • Actions
      • Set EnemyUpgrade = (EnemyUpgrade + 1)
      • Player - Set the current research level of Palitic to EnemyUpgrade for Player 12 (Brown)
      • Player - Set the current research level of Ancient Hydra to EnemyUpgrade for Player 12 (Brown)
      • Player - Set the current research level of Palitic Defender to EnemyUpgrade for Player 12 (Brown)
      • Player - Set the current research level of Magnataur Destroyer to EnemyUpgrade for Player 12 (Brown)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Difficulty Equal to Easy
        • Then - Actions
          • Player - Set the current research level of Creep Upgrade (Easy) to EnemyUpgrade for Player 12 (Brown)
          • Player - Set the current research level of Creep Upgrade (Easy) to EnemyUpgrade for Player 11 (Dark Green)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Difficulty Equal to Normal
            • Then - Actions
              • Player - Set the current research level of Creep Upgrade (Normal) to EnemyUpgrade for Player 12 (Brown)
              • Player - Set the current research level of Creep Upgrade (Normal) to EnemyUpgrade for Player 11 (Dark Green)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Difficulty Equal to Hard
                • Then - Actions
                  • Player - Set the current research level of Creep Upgrade (Hard) to EnemyUpgrade for Player 12 (Brown)
                  • Player - Set the current research level of Creep Upgrade (Hard) to EnemyUpgrade for Player 11 (Dark Green)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Difficulty Equal to Extreme
                    • Then - Actions
                      • Player - Set the current research level of Creep Upgrade (Extreme) to EnemyUpgrade for Player 12 (Brown)
                      • Player - Set the current research level of Creep Upgrade (Extreme) to EnemyUpgrade for Player 11 (Dark Green)
                    • Else - Actions
      • For each (Integer TempInt) from 1 to 8, do (Player - Set the current research level of Ursa Warrior Upgrade (Normal) to EnemyUpgrade for Player[TempInt])
      • For each (Integer TempInt) from 1 to 8, do (Player - Set the current research level of Infernal Upgrade (Easy) to EnemyUpgrade for Player[TempInt])
      • Game - Display to (All players) the text: |c00FDD017Enemies h...


End of additional triggers.

If anybody can come up with an idea WHY THE HELL that lag happens, I'd be eternally grateful.
 
Level 19
Joined
Jul 2, 2011
Messages
2,162
hmm

I recall having th same problem with my trig.

now let me see if I can remember what the problem was

...

hmm...

does your program have a system of checking to see if the special event is over?

or an order string?

remember to turn of your checker and to stop all orders in order Que before issuing new orders

because I don't see any leaks in your trig
 
Level 18
Joined
May 11, 2012
Messages
2,103
hmm

I recall having th same problem with my trig.

now let me see if I can remember what the problem was

...

hmm...

does your program have a system of checking to see if the special event is over?

or an order string?

remember to turn of your checker and to stop all orders in order Que before issuing new orders

because I don't see any leaks in your trig

It has a timer. When the timer runs out, the trigger fires out.
Yeah it is leakless.

remember to turn of your checker and to stop all orders in order Que before issuing new orders

You see, I never thought of that. Maybe indeed I am constantly doing some orders while the enemies are paused.

I read your thread. You asked someone to give idea. I am.
I appreciate you trying to help.
Try remove that trigger SE3. If it still lag, I don't know what else. In your case, lag can happen when you have created too many units.
As I said, the game only starts lagging after each of the events finishes, and the heavyness of the lag depends on user's PC performance. There is no lag without those triggers.
And as you can clearly see, I turned off the trigger that spawns creeps.
 
Level 10
Joined
May 28, 2011
Messages
455
I don't see any problem in your coding except I could only point out that your case is creating too many units with loop. If you disable all these triggers, and focus only 1. It should be enough to tell you that whether your trigger or some other triggers that caused the lag.
 
Level 18
Joined
May 11, 2012
Messages
2,103
I don't see any problem in your coding except I could only point out that your case is creating too many units with loop. If you disable all these triggers, and focus only 1. It should be enough to tell you that whether your trigger or some other triggers that caused the lag.

I am suspecting it's the moving order after special event. Still not sure tho..
 
Level 11
Joined
Dec 19, 2012
Messages
411
Triggers : Special Effect 1, Special Effect 2, Special Effect 3, Special Effect End 2, Special Effect End 1 and Special Effect End 3.

Event : share the same timer expired event, so if timer expired, 6 triggers will get fire depend on the position of the trigger which execute first.

Actions : Picking all units in (Playable area) is a very heavy actions depend on the size of your map and the amount of units you having inside your map.

Actions : "call DestroyTrigger(GetTriggeringTrigger())" is there a reason for you to destroy them?

Leaks : Pick units in (Playable area) matching ... < Leaks, it is due to GUI function creating a local unit group, and returning it w/o nulling the local variable, causing leaks.




Triggers : Special Effect loop 1, Special Effect loop 2

Question : how large is your SE <gen> ? Also posting the explosions trigger could probably relates to your game lag.

Leaks : Picking unit matching ...




Trigger : SE 3 Revenant, SE 3 Revenant loop

Actions : Setting time = 0.06 inside SE 3 Revenant, and revive in SE 3 Revenant loop, basically you revive your unit after 0.12 seconds?



Trigger : SE Pausing

Actions : picking units in (Playable area) every 1 second
 
Status
Not open for further replies.
Top