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

Trigger Code memory leaks,

Status
Not open for further replies.
Level 9
Joined
Apr 28, 2006
Messages
187
Ive recently foudn out about this whole "memory leak" thing, and its worrying.
This is one of ROTG's triggers, apparently with TONS of leaks, any suggestions fellas?

  • All Random 1V1
    • Events
    • Conditions
    • Actions
      • -------- GAME SETUP 1V1 --------
      • -------- PRIVATE DUELLING BUTTON INSERT --------
      • Dialog - Clear PrivateDuelling
      • Dialog - Change the title of PrivateDuelling to Private ...
      • Dialog - Create a dialog button for PrivateDuelling labelled On
      • Set Buttom_PrivateDuellingON = (Last created dialog Button)
      • Dialog - Create a dialog button for PrivateDuelling labelled Off
      • Set Buttom_PrivateDuellingOFF = (Last created dialog Button)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) slot status) Equal to Is playing
        • Then - Actions
          • Dialog - Show PrivateDuelling for Player 1 (Red)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 2 (Blue) slot status) Equal to Is playing
            • Then - Actions
              • Dialog - Show PrivateDuelling for Player 2 (Blue)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Player 3 (Teal) slot status) Equal to Is playing
                • Then - Actions
                  • Dialog - Show PrivateDuelling for Player 3 (Teal)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Player 4 (Purple) slot status) Equal to Is playing
                    • Then - Actions
                      • Dialog - Show PrivateDuelling for Player 4 (Purple)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Player 5 (Yellow) slot status) Equal to Is playing
                        • Then - Actions
                          • Dialog - Show PrivateDuelling for Player 5 (Yellow)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Player 6 (Orange) slot status) Equal to Is playing
                            • Then - Actions
                              • Dialog - Show PrivateDuelling for Player 6 (Orange)
                            • Else - Actions
                              • Do nothing
      • -------- END PRIVATE DUELLING BUTTON INSERT --------
      • Player Group - Pick every player in Team1 and do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across Team1BASE <gen>
      • Player Group - Pick every player in Team2 and do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across Team2BASE <gen>
      • Trigger - Turn off (This trigger)
      • Game - Display to (All players) the text: (|c00FF7F00 + (1v1 All Random Mode has been selected! + |r))
      • Set GameDifficultyMode = 1
      • Destructible - Set life of Prison Gate (Boss Prison Outer Door) 0052 <gen> to 1000.00
      • -------- Nighttime --------
      • Game - Set the time of day to 17.30
      • Player Group - Pick every player in Team1 and do (Actions)
        • Loop - Actions
          • Player - Set (Picked player) Current gold to 1500
          • Player - Set (Picked player) Current lumber to 100
      • Player Group - Pick every player in Team2 and do (Actions)
        • Loop - Actions
          • Player - Set (Picked player) Current gold to 1500
          • Player - Set (Picked player) Current lumber to 100
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Camera - Reset camera for (Picked player) to standard game-view over 0.00 seconds
      • Set RegionCenter1 = (Center of ArgonaxRestRegion <gen>)
      • Unit - Create 1 Titan (1 Players) for Neutral Hostile at RegionCenter1 facing 270.00 degrees
      • Custom script: call RemoveLocation(udg_RegionCenter1)
      • Set BossMonster = (Last created unit)
      • Unit - Pause BossMonster
      • Trigger - Run TitanSetup <gen> (ignoring conditions)
      • Trigger - Run Disable Repick <gen> (ignoring conditions)
      • Trigger - Run Upgrade Creeps to Level 1 <gen> (ignoring conditions)
      • Trigger - Run Hero Setup <gen> (ignoring conditions)
      • Wait until (HeroSetup Equal to True), checking every 0.10 seconds
      • -------- TEAM1 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) controller) Equal to User
          • (Player 1 (Red) slot status) Equal to Is playing
        • Then - Actions
          • -------- PLAYER1 --------
          • Set RandomHero = (Random integer number between 1 and Random_Count)
          • Sound - Play HeroChosen <gen> at 100.00% volume, located at (Center of RandomRegion <gen>) with Z offset 0.00
          • Special Effect - Create a special effect at (Center of RandomRegion <gen>) using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
          • Wait 0.25 seconds
          • Unit - Create 1 Hero_Array[Random_Data[RandomHero]] for Player 1 (Red) at (Center of Team1StartZone <gen>) facing 0.00 degrees
          • Set RanUnitType = (Unit-type of (Last created unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RanUnitType Equal to Vampire
            • Then - Actions
              • Set VampireUnit = PlayerHero[1]
              • Set VampirePlayer = Player 1 (Red)
            • Else - Actions
              • Do nothing
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RanUnitType Equal to Ravagore
            • Then - Actions
              • Set PlayerHero[1] = (Last created unit)
              • Set RavagoreUnit = PlayerHero[1]
              • Trigger - Turn on Damage Ravagore <gen>
            • Else - Actions
              • Do nothing
          • Set PlayerHero[1] = (Last created unit)
          • Selection - Select (Last created unit) for Player 1 (Red)
          • Hero - Create |c007EBFF1Mercenary Contract|r and give it to (Last created unit)
          • -------- GET UNIT TYPE OF LAST CREATED UNIT --------
          • Unit Group - Pick every unit in (Units in HeroSelectionRegion <gen> matching ((Unit-type of (Matching unit)) Equal to RanUnitType)) and do
  • (Actions)
    • Loop - Actions
      • Special Effect - Create a special effect attached to the origin of (Picked unit) using
  • Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
    • Sound - Play HeroChosen <gen> at 100.00% volume, located at (Center of RandomRegion <gen>) with Z offset 0.00
    • Unit - Hide (Picked unit)
    • Set Hero_Taken[RandomHero] = 1
    • -------- PICK ALL UNITS IN REGION HERO ARENA OF TYPE AND DO UNIT-HIDE --------
    • Camera - Pan camera for Player 1 (Red) to (Center of Team1StartZone <gen>) over 0.00 seconds
    • Sound - Play HeroSpawned <gen> at 100.00% volume, attached to (Last created unit)
    • Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Other\Awaken\Awaken.mdl
    • Set HeroSpawnsEffect = (Last created special effect)
    • Game - Display to (All players) the text: ((|cffffcc00 + ((Name of Player 1 (Red)) + has randomly chosen )) + ((Name of (Last created unit))
  • + !|r))
    • -------- SOMETHING TO PREVENT THEM PICKING ONE BY REGION --------
    • -------- Theres now a limit so that only 2 of each type of hero can be on the map at the same time. --------
    • -------- THIS REMOVES THIS HERO FORM THE RANDOM ARRAY.. --------
    • Set Random_Data[RandomHero] = Random_Count
    • Set Random_Count = (Random_Count - 1)
    • Else - Actions
      • Do nothing
    • -------- PLAYER2 --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Player 2 (Blue) controller) Equal to User
        • (Player 2 (Blue) slot status) Equal to Is playing
      • Then - Actions
        • Set RandomHero = (Random integer number between 1 and Random_Count)
        • Sound - Play HeroChosen <gen> at 100.00% volume, located at (Center of RandomRegion <gen>) with Z offset 0.00
        • Special Effect - Create a special effect at (Center of RandomRegion <gen>) using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
        • Wait 0.25 seconds
        • Unit - Create 1 Hero_Array[Random_Data[RandomHero]] for Player 2 (Blue) at (Center of Team1StartZone <gen>) facing 0.00 degrees
        • Set RanUnitType = (Unit-type of (Last created unit))
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • RanUnitType Equal to Vampire
          • Then - Actions
            • Set VampireUnit = PlayerHero[2]
            • Set VampirePlayer = Player 2 (Blue)
          • Else - Actions
            • Do nothing
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • RanUnitType Equal to Ravagore
          • Then - Actions
            • Set PlayerHero[2] = (Last created unit)
            • Set RavagoreUnit = PlayerHero[2]
            • Trigger - Turn on Damage Ravagore <gen>
          • Else - Actions
            • Do nothing
        • Set PlayerHero[2] = (Last created unit)
        • Selection - Select (Last created unit) for Player 2 (Blue)
        • Hero - Create |c007EBFF1Mercenary Contract|r and give it to (Last created unit)
        • -------- GET UNIT TYPE OF LAST CREATED UNIT --------
        • Unit Group - Pick every unit in (Units in HeroSelectionRegion <gen> matching ((Unit-type of (Matching unit)) Equal to RanUnitType)) and do
  • (Actions)
    • Loop - Actions
      • Special Effect - Create a special effect attached to the origin of (Picked unit) using
  • Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
    • Sound - Play HeroChosen <gen> at 100.00% volume, located at (Center of RandomRegion <gen>) with Z offset 0.00
    • Unit - Hide (Picked unit)
    • Set Hero_Taken[RandomHero] = 1
    • -------- PICK ALL UNITS IN REGION HERO ARENA OF TYPE AND DO UNIT-HIDE --------
    • Camera - Pan camera for Player 2 (Blue) to (Center of Team1StartZone <gen>) over 0.00 seconds
    • Sound - Play HeroSpawned <gen> at 100.00% volume, attached to (Last created unit)
    • Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Other\Awaken\Awaken.mdl
    • Set HeroSpawnsEffect = (Last created special effect)
    • Game - Display to (All players) the text: ((|cffffcc00 + ((Name of Player 2 (Blue)) + has randomly chosen )) + ((Name of (Last created
  • unit)) + !|r))
    • -------- SOMETHING TO PREVENT THEM PICKING ONE BY REGION --------
    • -------- Theres now a limit so that only 2 of each type of hero can be on the map at the same time. --------
    • -------- THIS REMOVES THIS HERO FORM THE RANDOM ARRAY.. --------
    • Set Random_Data[RandomHero] = Random_Count
    • Set Random_Count = (Random_Count - 1)
    • Else - Actions
      • Do nothing
    • -------- PLAYER3 --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Player 3 (Teal) controller) Equal to User
        • (Player 3 (Teal) slot status) Equal to Is playing
      • Then - Actions
        • Set RandomHero = (Random integer number between 1 and Random_Count)
        • Sound - Play HeroChosen <gen> at 100.00% volume, located at (Center of RandomRegion <gen>) with Z offset 0.00
        • Special Effect - Create a special effect at (Center of RandomRegion <gen>) using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
        • Wait 0.25 seconds
        • Unit - Create 1 Hero_Array[Random_Data[RandomHero]] for Player 3 (Teal) at (Center of Team1StartZone <gen>) facing 0.00 degrees
        • Set RanUnitType = (Unit-type of (Last created unit))
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • RanUnitType Equal to Vampire
          • Then - Actions
            • Set VampireUnit = PlayerHero[3]
            • Set VampirePlayer = Player 3 (Teal)
          • Else - Actions
            • Do nothing
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • RanUnitType Equal to Ravagore
          • Then - Actions
            • Set PlayerHero[3] = (Last created unit)
            • Set RavagoreUnit = PlayerHero[3]
            • Trigger - Turn on Damage Ravagore <gen>
          • Else - Actions
            • Do nothing
        • Set PlayerHero[3] = (Last created unit)
        • Selection - Select (Last created unit) for Player 3 (Teal)
        • Hero - Create |c007EBFF1Mercenary Contract|r and give it to (Last created unit)
        • -------- GET UNIT TYPE OF LAST CREATED UNIT --------
        • Unit Group - Pick every unit in (Units in HeroSelectionRegion <gen> matching ((Unit-type of (Matching unit)) Equal to RanUnitType)) and do
  • (Actions)
    • Loop - Actions
      • Special Effect - Create a special effect attached to the origin of (Picked unit) using
  • Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
    • Sound - Play HeroChosen <gen> at 100.00% volume, located at (Center of RandomRegion <gen>) with Z offset 0.00
    • Unit - Hide (Picked unit)
    • Set Hero_Taken[RandomHero] = 1
    • -------- PICK ALL UNITS IN REGION HERO ARENA OF TYPE AND DO UNIT-HIDE --------
    • Camera - Pan camera for Player 3 (Teal) to (Center of Team1StartZone <gen>) over 0.00 seconds
    • Sound - Play HeroSpawned <gen> at 100.00% volume, attached to (Last created unit)
    • Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Other\Awaken\Awaken.mdl
    • Set HeroSpawnsEffect = (Last created special effect)
    • Game - Display to (All players) the text: ((|cffffcc00 + ((Name of Player 3 (Teal)) + has randomly chosen )) + ((Name of (Last created
  • unit)) + !|r))
    • -------- SOMETHING TO PREVENT THEM PICKING ONE BY REGION --------
    • -------- Theres now a limit so that only 2 of each type of hero can be on the map at the same time. --------
    • -------- THIS REMOVES THIS HERO FORM THE RANDOM ARRAY.. --------
    • Set Random_Data[RandomHero] = Random_Count
    • Set Random_Count = (Random_Count - 1)
    • Else - Actions
      • Do nothing
    • -------- TEAM2 --------
    • -------- PLAYER4 --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Player 4 (Purple) controller) Equal to User
        • (Player 4 (Purple) slot status) Equal to Is playing
      • Then - Actions
        • Set RandomHero = (Random integer number between 1 and Random_Count)
        • Sound - Play HeroChosen <gen> at 100.00% volume, located at (Center of RandomRegion <gen>) with Z offset 0.00
        • Special Effect - Create a special effect at (Center of RandomRegion <gen>) using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
        • Wait 0.25 seconds
        • Unit - Create 1 Hero_Array[Random_Data[RandomHero]] for Player 4 (Purple) at (Center of Team2StartZone <gen>) facing 180.00 degrees
        • Set RanUnitType = (Unit-type of (Last created unit))
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • RanUnitType Equal to Vampire
          • Then - Actions
            • Set VampireUnit = PlayerHero[4]
            • Set VampirePlayer = Player 4 (Purple)
          • Else - Actions
            • Do nothing
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • RanUnitType Equal to Ravagore
          • Then - Actions
            • Set PlayerHero[4] = (Last created unit)
            • Set RavagoreUnit = PlayerHero[4]
            • Trigger - Turn on Damage Ravagore <gen>
          • Else - Actions
            • Do nothing
        • Set PlayerHero[4] = (Last created unit)
        • Hero - Create |c007EBFF1Mercenary Contract|r and give it to (Last created unit)
        • Selection - Select (Last created unit) for Player 4 (Purple)
        • -------- GET UNIT TYPE OF LAST CREATED UNIT --------
        • Unit Group - Pick every unit in (Units in HeroSelectionRegion <gen> matching ((Unit-type of (Matching unit)) Equal to RanUnitType)) and do
  • (Actions)
    • Loop - Actions
      • Special Effect - Create a special effect attached to the origin of (Picked unit) using
  • Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
    • Sound - Play HeroChosen <gen> at 100.00% volume, located at (Center of RandomRegion <gen>) with Z offset 0.00
    • Unit - Hide (Picked unit)
    • Set Hero_Taken[RandomHero] = 1
    • -------- PICK ALL UNITS IN REGION HERO ARENA OF TYPE AND DO UNIT-HIDE --------
    • Camera - Pan camera for Player 4 (Purple) to (Center of Team2StartZone <gen>) over 0.00 seconds
    • Sound - Play HeroSpawned <gen> at 100.00% volume, attached to (Last created unit)
    • Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Other\Awaken\Awaken.mdl
    • Set HeroSpawnsEffect = (Last created special effect)
    • Game - Display to (All players) the text: ((|cffffcc00 + ((Name of Player 4 (Purple)) + has randomly chosen )) + ((Name of (Last created
  • unit)) + !|r))
    • -------- SOMETHING TO PREVENT THEM PICKING ONE BY REGION --------
    • Set Random_Data[RandomHero] = Random_Count
    • Set Random_Count = (Random_Count - 1)
    • Else - Actions
      • Do nothing
    • -------- PLAYER5 --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Player 5 (Yellow) controller) Equal to User
        • (Player 5 (Yellow) slot status) Equal to Is playing
      • Then - Actions
        • Set RandomHero = (Random integer number between 1 and Random_Count)
        • Sound - Play HeroChosen <gen> at 100.00% volume, located at (Center of RandomRegion <gen>) with Z offset 0.00
        • Special Effect - Create a special effect at (Center of RandomRegion <gen>) using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
        • Wait 0.25 seconds
        • Unit - Create 1 Hero_Array[Random_Data[RandomHero]] for Player 5 (Yellow) at (Center of Team2StartZone <gen>) facing 180.00 degrees
        • Set RanUnitType = (Unit-type of (Last created unit))
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • RanUnitType Equal to Vampire
          • Then - Actions
            • Set VampireUnit = PlayerHero[5]
            • Set VampirePlayer = Player 5 (Yellow)
          • Else - Actions
            • Do nothing
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • RanUnitType Equal to Ravagore
          • Then - Actions
            • Set PlayerHero[5] = (Last created unit)
            • Set RavagoreUnit = PlayerHero[5]
            • Trigger - Turn on Damage Ravagore <gen>
          • Else - Actions
            • Do nothing
        • Set PlayerHero[5] = (Last created unit)
        • Hero - Create |c007EBFF1Mercenary Contract|r and give it to (Last created unit)
        • Selection - Select (Last created unit) for Player 5 (Yellow)
        • -------- GET UNIT TYPE OF LAST CREATED UNIT --------
        • Unit Group - Pick every unit in (Units in HeroSelectionRegion <gen> matching ((Unit-type of (Matching unit)) Equal to RanUnitType)) and do
  • (Actions)
    • Loop - Actions
      • Special Effect - Create a special effect attached to the origin of (Picked unit) using
  • Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
    • Sound - Play HeroChosen <gen> at 100.00% volume, located at (Center of RandomRegion <gen>) with Z offset 0.00
    • Unit - Hide (Picked unit)
    • Set Hero_Taken[RandomHero] = 1
    • -------- PICK ALL UNITS IN REGION HERO ARENA OF TYPE AND DO UNIT-HIDE --------
    • Camera - Pan camera for Player 5 (Yellow) to (Center of Team2StartZone <gen>) over 0.00 seconds
    • Sound - Play HeroSpawned <gen> at 100.00% volume, attached to (Last created unit)
    • Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Other\Awaken\Awaken.mdl
    • Set HeroSpawnsEffect = (Last created special effect)
    • Game - Display to (All players) the text: ((|cffffcc00 + ((Name of Player 5 (Yellow)) + has randomly chosen )) + ((Name of (Last created
  • unit)) + !|r))
    • -------- SOMETHING TO PREVENT THEM PICKING ONE BY REGION --------
    • Set Random_Data[RandomHero] = Random_Count
    • Set Random_Count = (Random_Count - 1)
    • Else - Actions
      • Do nothing
    • -------- PLAYER6 --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Player 6 (Orange) controller) Equal to User
        • (Player 6 (Orange) slot status) Equal to Is playing
      • Then - Actions
        • Set RandomHero = (Random integer number between 1 and Random_Count)
        • Sound - Play HeroChosen <gen> at 100.00% volume, located at (Center of RandomRegion <gen>) with Z offset 0.00
        • Special Effect - Create a special effect at (Center of RandomRegion <gen>) using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
        • Wait 0.25 seconds
        • Unit - Create 1 Hero_Array[Random_Data[RandomHero]] for Player 6 (Orange) at (Center of Team2StartZone <gen>) facing 180.00 degrees
        • Set RanUnitType = (Unit-type of (Last created unit))
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • RanUnitType Equal to Vampire
          • Then - Actions
            • Set VampireUnit = PlayerHero[6]
            • Set VampirePlayer = Player 6 (Orange)
          • Else - Actions
            • Do nothing
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • RanUnitType Equal to Ravagore
          • Then - Actions
            • Set PlayerHero[6] = (Last created unit)
            • Set RavagoreUnit = PlayerHero[6]
            • Trigger - Turn on Damage Ravagore <gen>
          • Else - Actions
            • Do nothing
        • Set PlayerHero[6] = (Last created unit)
        • Hero - Create |c007EBFF1Mercenary Contract|r and give it to (Last created unit)
        • Selection - Select (Last created unit) for Player 6 (Orange)
        • -------- GET UNIT TYPE OF LAST CREATED UNIT --------
        • Unit Group - Pick every unit in (Units in HeroSelectionRegion <gen> matching ((Unit-type of (Matching unit)) Equal to RanUnitType)) and do
  • (Actions)
    • Loop - Actions
      • Special Effect - Create a special effect attached to the origin of (Picked unit) using
  • Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
    • Sound - Play HeroChosen <gen> at 100.00% volume, located at (Center of RandomRegion <gen>) with Z offset 0.00
    • Unit - Hide (Picked unit)
    • Set Hero_Taken[RandomHero] = 1
    • -------- PICK ALL UNITS IN REGION HERO ARENA OF TYPE AND DO UNIT-HIDE --------
    • Camera - Pan camera for Player 6 (Orange) to (Center of Team2StartZone <gen>) over 0.00 seconds
    • Sound - Play HeroSpawned <gen> at 100.00% volume, attached to (Last created unit)
    • Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Other\Awaken\Awaken.mdl
    • Set HeroSpawnsEffect = (Last created special effect)
    • Game - Display to (All players) the text: ((|cffffcc00 + ((Name of Player 6 (Orange)) + has randomly chosen )) + ((Name of (Last created
  • unit)) + !|r))
    • -------- SOMETHING TO PREVENT THEM PICKING ONE BY REGION --------
    • Set Random_Data[RandomHero] = Random_Count
    • Set Random_Count = (Random_Count - 1)
    • Else - Actions
      • Do nothing
 
Level 9
Joined
Apr 28, 2006
Messages
187
not yet, but im working on it, this is the revised trigger: (thanks godless!)

  • All Random 1V1
    • Events
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Game - Display to (All players) the text: (|c00FF7F00 + (1v1 All Random Mode has been selected! + |r))
      • Set GameDifficultyMode = 1
      • Destructible - Set life of Prison Gate (Boss Prison Outer Door) 0052 <gen> to 1000.00
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Set (Picked player) Current gold to 1100
          • Player - Set (Picked player) Current lumber to 75
      • Set TempPoint1 = (Center of ArgonaxRestRegion <gen>)
      • Unit - Create 1 Titan (1 Players) for Neutral Hostile at TempPoint1 facing 270.00 degrees
      • Set BossMonster = (Last created unit)
      • Hero - Set BossMonster Hero-level to 25, Hide level-up graphics
      • Unit - Pause BossMonster
      • Wait until (HeroSetup Equal to True), checking every 0.10 seconds
      • -------- TEAM1 --------
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player((Integer A))) controller) Equal to User
              • ((Player((Integer A))) slot status) Equal to Is playing
            • Then - Actions
              • Set RandomHero = (Random integer number between 1 and Random_Count)
              • Set TempPoint1 = (Center of RandomRegion <gen>)
              • Sound - Play HeroChosen <gen> at 100.00% volume, located at TempPoint1 with Z offset 0.00
              • Special Effect - Create a special effect at TempPoint1 using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • Wait 0.25 seconds
              • Set TempPoint1 = (Center of Team1StartZone <gen>)
              • Unit - Create 1 Hero_Array[Random_Data[RandomHero]] for (Player((Integer A))) at TempPoint1 facing 0.00 degrees
              • Set RanUnitType = (Unit-type of (Last created unit))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RanUnitType Equal to Vampire
                • Then - Actions
                  • Set VampireUnit = PlayerHero[(Integer A)]
                  • Set VampirePlayer = (Player((Integer A)))
                • Else - Actions
                  • Do nothing
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RanUnitType Equal to Ravagore
                • Then - Actions
                  • Set PlayerHero[(Integer A)] = (Last created unit)
                  • Set RavagoreUnit = PlayerHero[(Integer A)]
                  • Trigger - Turn on Damage Ravagore <gen>
                • Else - Actions
                  • Do nothing
              • Set PlayerHero[(Integer A)] = (Last created unit)
              • Selection - Select (Last created unit) for (Player((Integer A)))
              • Hero - Create |c007EBFF1Mercenary Contract|r and give it to (Last created unit)
              • -------- GET UNIT TYPE OF LAST CREATED UNIT --------
              • Unit Group - Pick every unit in (Units in HeroSelectionRegion <gen> matching ((Unit-type of (Matching unit)) Equal to RanUnitType)) and do (Actions)
                • Loop - Actions
                  • Set TempUnitGroup1 = (Last created unit group)
                  • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Set TempPoint1 = (Center of RandomRegion <gen>)
                  • Sound - Play HeroChosen <gen> at 100.00% volume, located at TempPoint1 with Z offset 0.00
                  • Unit - Hide (Picked unit)
                  • Set Hero_Taken[RandomHero] = 1
              • Custom script: call DestroyGroup( udg_TempUnitGroup1 )
              • Set TempPoint1 = (Center of Team1StartZone <gen>)
              • Camera - Pan camera for (Player((Integer A))) to TempPoint1 over 0.00 seconds
              • Sound - Play HeroSpawned <gen> at 100.00% volume, attached to (Last created unit)
              • Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Other\Awaken\Awaken.mdl
              • Special Effect - Destroy (Last created special effect)
              • Set HeroSpawnsEffect = (Last created special effect)
              • Game - Display to (All players) the text: ((|cffffcc00 + ((Name of (Player((Integer A)))) + has randomly chosen )) + ((Name of (Last created unit)) + !|r))
              • Set Random_Data[RandomHero] = Random_Count
              • Set Random_Count = (Random_Count - 1)
              • Custom script: call RemoveLocation(udg_TempPoint1)
            • Else - Actions
              • Do nothing
      • -------- TEAM2 --------
      • For each (Integer A) from 5 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player((Integer A))) controller) Equal to User
              • ((Player((Integer A))) slot status) Equal to Is playing
            • Then - Actions
              • Set RandomHero = (Random integer number between 1 and Random_Count)
              • Set TempPoint2 = (Center of RandomRegion <gen>)
              • Sound - Play HeroChosen <gen> at 100.00% volume, located at TempPoint2 with Z offset 0.00
              • Special Effect - Create a special effect at TempPoint2 using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • Wait 0.25 seconds
              • Set TempPoint2 = (Center of Team2StartZone <gen>)
              • Unit - Create 1 Hero_Array[Random_Data[RandomHero]] for (Player((Integer A))) at TempPoint2 facing 0.00 degrees
              • Set RanUnitType = (Unit-type of (Last created unit))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RanUnitType Equal to Vampire
                • Then - Actions
                  • Set VampireUnit = PlayerHero[(Integer A)]
                  • Set VampirePlayer = (Player((Integer A)))
                • Else - Actions
                  • Do nothing
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RanUnitType Equal to Ravagore
                • Then - Actions
                  • Set PlayerHero[(Integer A)] = (Last created unit)
                  • Set RavagoreUnit = PlayerHero[(Integer A)]
                  • Trigger - Turn on Damage Ravagore <gen>
                • Else - Actions
                  • Do nothing
              • Set PlayerHero[(Integer A)] = (Last created unit)
              • Selection - Select (Last created unit) for (Player((Integer A)))
              • Hero - Create |c007EBFF1Mercenary Contract|r and give it to (Last created unit)
              • -------- GET UNIT TYPE OF LAST CREATED UNIT --------
              • Unit Group - Pick every unit in (Units in HeroSelectionRegion <gen> matching ((Unit-type of (Matching unit)) Equal to RanUnitType)) and do (Actions)
                • Loop - Actions
                  • Set TempUnitGroup2 = (Last created unit group)
                  • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Set TempPoint2 = (Center of RandomRegion <gen>)
                  • Sound - Play HeroChosen <gen> at 100.00% volume, located at TempPoint2 with Z offset 0.00
                  • Unit - Hide (Picked unit)
                  • Set Hero_Taken[RandomHero] = 1
              • Custom script: call DestroyGroup( udg_TempUnitGroup2 )
              • Set TempPoint2 = (Center of Team2StartZone <gen>)
              • Camera - Pan camera for (Player((Integer A))) to TempPoint2 over 0.00 seconds
              • Sound - Play HeroSpawned <gen> at 100.00% volume, attached to (Last created unit)
              • Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Other\Awaken\Awaken.mdl
              • Special Effect - Destroy (Last created special effect)
              • Set HeroSpawnsEffect = (Last created special effect)
              • Game - Display to (All players) the text: ((|cffffcc00 + ((Name of (Player((Integer A)))) + has randomly chosen )) + ((Name of (Last created unit)) + !|r))
              • Set Random_Data[RandomHero] = Random_Count
              • Set Random_Count = (Random_Count - 1)
              • Custom script: call RemoveLocation(udg_TempPoint2)
            • Else - Actions
              • Do nothing
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
 
Status
Not open for further replies.
Top