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

Check This Trigger

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,103
Hello. I experirence some heavy lags for a minute or two when the event finishes, and my heroes get moved back. This lag occurs only in the presence of enemy units. When they are absent, lag ain't happening.

Here's the trigger:
  • Special Event 1 End
    • Events
      • Time - SE_Timer expires
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Trigger - Turn off Special Event 1 Loop <gen>
      • Trigger - Turn on On Death <gen>
      • Trigger - Turn on Music Commands <gen>
      • Trigger - Turn on Research Upgrade <gen>
      • Trigger - Turn off Special Event Death <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: |cff00ffff100|r |c0...
              • Player - Add 100000 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]
          • 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 720.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 - Resume NextWave_Timer
      • Countdown Timer - Show NextWave_TimerWindow
      • 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)
      • Trigger - Turn on Special Event 2 <gen>
      • Trigger - Turn on Creep Spawn <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())
 
Level 18
Joined
May 11, 2012
Messages
2,103
Here they are.
And yes, I am, because as you can see, I have another trigger that runs when the timer restarted. :)

Here they are:
  • On Death
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Triggering unit) belongs to an enemy of Player 1 (Red)) Equal to False
    • Actions
      • Set HeroRespawn_MaxIndex = (HeroRespawn_MaxIndex + 1)
      • Set HeroRespawn[HeroRespawn_MaxIndex] = (Triggering unit)
      • Set HeroRespawn_Owner[HeroRespawn_MaxIndex] = (Owner of HeroRespawn[HeroRespawn_MaxIndex])
      • Set HeroRespawn_Time[HeroRespawn_MaxIndex] = ((Level of HeroRespawn[HeroRespawn_MaxIndex]) x 5)
      • Set TempPlayerGroup = (Player group(HeroRespawn_Owner[HeroRespawn_MaxIndex]))
      • 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
              • HeroRespawn_Owner[HeroRespawn_MaxIndex] Equal to Player[TempInt]
            • Then - Actions
              • Game - Display to TempPlayerGroup the text: (PlayerColors[TempInt] + ((Name of HeroRespawn_Owner[HeroRespawn_MaxIndex]) + |c00FDD017, your hero has been killed!|r))
            • Else - Actions
      • Countdown Timer - Start HeroRespawn_Timer[HeroRespawn_MaxIndex] as a One-shot timer that will expire in ((Real((Level of HeroRespawn[HeroRespawn_MaxIndex]))) x 5.00) seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title Respawn in:
      • Set HeroRespawn_TimerWindow[HeroRespawn_MaxIndex] = (Last created timer window)
      • Countdown Timer - Hide HeroRespawn_TimerWindow[HeroRespawn_MaxIndex]
      • Countdown Timer - Show HeroRespawn_TimerWindow[HeroRespawn_MaxIndex] for HeroRespawn_Owner[HeroRespawn_MaxIndex]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HeroRespawn_MaxIndex Equal to 1
        • Then - Actions
          • Trigger - Turn on On Respawn <gen>
        • Else - Actions
      • Custom script: call DestroyForce(udg_TempPlayerGroup)
      • Custom script: set udg_TempPlayerGroup = null
  • 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)
      • -------- ========== 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)
      • 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 Upgrade to EnemyUpgrade for Player 12 (Brown)
      • Player - Set the current research level of Palitic Defender Upgrade to EnemyUpgrade for Player 12 (Brown)
      • Player - Set the current research level of Magnataur Destroyer to EnemyUpgrade for Player 12 (Brown)
      • Player - Set the current research level of Ancient Hydra 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 Demon Tower Upgrade (Easy) to EnemyUpgrade for Player 1 (Red)
        • 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 Demon Tower Upgrade (Normal) to EnemyUpgrade for Player 1 (Red)
            • 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 Demon Tower Upgrade (Hard) to EnemyUpgrade for Player 1 (Red)
                • 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 Demon Tower Upgrade (Extreme) to EnemyUpgrade for Player 1 (Red)
                    • 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...
 
Status
Not open for further replies.
Top