• 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.

My Random/Ar system...

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,103
Hy, I need someone to check this system and tell me does the 'RandomHeroInt'' Integer Variable needs to be array? I'm not sure anymore....

Here are the triggers:

  • Hero Selection Initilization
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set HeroCount = 14
      • Set HeroSelection_HeroId = (HeroSelection_HeroId + 1)
      • Set HeroSelection_HeroUnit[HeroSelection_HeroId] = Naga Queen 0000 <gen>
      • Set HeroSelection_HeroId = (HeroSelection_HeroId + 1)
      • Set HeroSelection_HeroUnit[HeroSelection_HeroId] = Arachnid 0001 <gen>
      • Set HeroSelection_HeroId = (HeroSelection_HeroId + 1)
      • Set HeroSelection_HeroUnit[HeroSelection_HeroId] = Abystic Flamelord 0003 <gen>
      • Set HeroSelection_HeroId = (HeroSelection_HeroId + 1)
      • Set HeroSelection_HeroUnit[HeroSelection_HeroId] = Dark Evil 0004 <gen>
      • Set HeroSelection_HeroId = (HeroSelection_HeroId + 1)
      • Set HeroSelection_HeroUnit[HeroSelection_HeroId] = The Basher 0005 <gen>
      • Set HeroSelection_HeroId = (HeroSelection_HeroId + 1)
      • Set HeroSelection_HeroUnit[HeroSelection_HeroId] = Lightning Destroyer 0006 <gen>
      • Set HeroSelection_HeroId = (HeroSelection_HeroId + 1)
      • Set HeroSelection_HeroUnit[HeroSelection_HeroId] = Myrmidon 0007 <gen>
      • Set HeroSelection_HeroId = (HeroSelection_HeroId + 1)
      • Set HeroSelection_HeroUnit[HeroSelection_HeroId] = Demon Hunter 0010 <gen>
      • Set HeroSelection_HeroId = (HeroSelection_HeroId + 1)
      • Set HeroSelection_HeroUnit[HeroSelection_HeroId] = Flaming Beast 0011 <gen>
      • Set HeroSelection_HeroId = (HeroSelection_HeroId + 1)
      • Set HeroSelection_HeroUnit[HeroSelection_HeroId] = Illusionist 0081 <gen>
      • Set HeroSelection_HeroId = (HeroSelection_HeroId + 1)
      • Set HeroSelection_HeroUnit[HeroSelection_HeroId] = Knight Vangore 0029 <gen>
      • Set HeroSelection_HeroId = (HeroSelection_HeroId + 1)
      • Set HeroSelection_HeroUnit[HeroSelection_HeroId] = Orc Ranger 0030 <gen>
      • Set HeroSelection_HeroId = (HeroSelection_HeroId + 1)
      • Set HeroSelection_HeroUnit[HeroSelection_HeroId] = The Raper 0071 <gen>
      • Set HeroSelection_HeroId = (HeroSelection_HeroId + 1)
      • Set HeroSelection_HeroUnit[HeroSelection_HeroId] = Earth Destroyer 0072 <gen>
      • -------- Integer --------
      • For each (Integer A) from 1 to 14, do (Actions)
        • Loop - Actions
          • Set RandomHeroData[(Integer A)] = (Integer A)
          • Unit Group - Add HeroSelection_HeroUnit[(Integer A)] to HeroSelection_AvailableHeroes
      • Custom script: call DestroyTrigger( GetTriggeringTrigger() )
  • Hero Selection Select
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
      • Player - Player 5 (Yellow) Selects a unit
      • Player - Player 6 (Orange) Selects a unit
      • Player - Player 7 (Green) Selects a unit
      • Player - Player 8 (Pink) Selects a unit
    • Conditions
      • HeroSelection_PlayerChosen[(Player number of (Triggering player))] Equal to False
      • ((Triggering unit) is in HeroSelection_AvailableHeroes) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Equal to HS_PlayerCurrentSelection[(Player number of (Triggering player))]
        • Then - Actions
          • For each (Integer B) from 1 to HeroSelection_HeroId, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Triggering unit) Equal to HeroSelection_HeroUnit[(Integer B)]
                • Then - Actions
                  • Set ReturnFromMission = (Center of Return from Mission <gen>)
                  • Unit - Change ownership of (Triggering unit) to (Triggering player) and Change color
                  • Unit - Move (Triggering unit) instantly to ReturnFromMission
                  • Unit - Unpause (Triggering unit)
                  • Hero - Create |cFFFFFF00Healing Potion and give it to (Triggering unit)
                  • Item - Set charges remaining in (Last created item) to 15
                  • Hero - Create |cFFFFFF00Mana Potion and give it to (Triggering unit)
                  • Item - Set charges remaining in (Last created item) to 15
                  • Hero - Create |cFFFFFF00Ankh of Reincarnation and give it to (Triggering unit)
                  • Unit Group - Remove (Triggering unit) from HeroSelection_AvailableHeroes
                  • Set HeroCount = (HeroCount - 1)
                  • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Set TempPoint = (Center of Return from Mission <gen>)
                  • Camera - Pan camera for (Triggering player) to TempPoint over 0.00 seconds
                  • Custom script: call RemoveLocation(udg_ReturnFromMission)
                  • Custom script: set udg_ReturnFromMission = null
                  • Floating Text - Destroy HeroSelection_FloatingText[(Integer B)]
                  • Set HeroSelection_PlayerChosen[(Player number of (Triggering player))] = True
                • Else - Actions
        • Else - Actions
          • Set HS_PlayerCurrentSelection[(Player number of (Triggering player))] = (Triggering unit)
  • All Random
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 1 to PlayerSlotStatusInteger, do (Actions)
        • Loop - Actions
          • Set HeroSelection_PlayerChosen[(Integer A)] = True
          • Set TempPoint = (Center of Return from Mission <gen>)
          • Set RandomHeroInt[(Integer A)] = (Random integer number between 1 and HeroCount)
          • Unit - Move HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[(Integer A)]]] instantly to TempPoint
          • Unit - Change ownership of HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[(Integer A)]]] to (Player((Integer A))) and Change color
          • Unit - Unpause HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[(Integer A)]]]
          • Hero - Create |cFFFFFF00Healing Potion and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[(Integer A)]]]
          • Item - Set charges remaining in (Last created item) to 15
          • Hero - Create |cFFFFFF00Mana Potion and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[(Integer A)]]]
          • Item - Set charges remaining in (Last created item) to 15
          • Hero - Create |cFFFFFF00Ankh of Reincarnation and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[(Integer A)]]]
          • Special Effect - Create a special effect attached to the origin of HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[(Integer A)]]] using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
          • Special Effect - Destroy (Last created special effect)
          • Camera - Pan camera for (Player((Integer A))) to TempPoint over 0.00 seconds
          • Selection - Select HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[(Integer A)]]] for (Owner of HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[(Integer A)]]])
          • Floating Text - Destroy HeroSelection_FloatingText[RandomHeroData[RandomHeroInt[(Integer A)]]]
          • Set RandomHeroData[RandomHeroInt[(Integer A)]] = HeroCount
          • Set HeroCount = (HeroCount - 1)
          • Unit Group - Remove HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[(Integer A)]]] from HeroSelection_AvailableHeroes
          • Set HeroSelection_PlayerChosen[(Player number of (Triggering player))] = True
          • Custom script: call RemoveLocation(udg_TempPoint)
      • Trigger - Turn off (This trigger)
      • Trigger - Turn off Game Mode <gen>
  • Repick All Random
    • Events
      • Player - Player 1 (Red) types a chat message containing -repick as An exact match
      • Player - Player 2 (Blue) types a chat message containing -repick as An exact match
      • Player - Player 3 (Teal) types a chat message containing -repick as An exact match
      • Player - Player 4 (Purple) types a chat message containing -repick as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -repick as An exact match
      • Player - Player 6 (Orange) types a chat message containing -repick as An exact match
      • Player - Player 7 (Green) types a chat message containing -repick as An exact match
      • Player - Player 8 (Pink) types a chat message containing -repick as An exact match
    • Conditions
      • HeroSelection_PlayerChosen[(Player number of (Triggering player))] Equal to True
      • Repick_Boolean[(Player number of (Triggering player))] Equal to False
    • Actions
      • Set HeroSelection_PlayerChosen[(Player number of (Triggering player))] = True
      • Set Repick_Boolean[(Player number of (Triggering player))] = True
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
      • Set TempPoint = (Center of Return from Mission <gen>)
      • Set RandomHeroInt[(Player number of (Triggering player))] = (Random integer number between 1 and HeroCount)
      • Unit - Move HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[(Player number of (Triggering player))]]] instantly to TempPoint
      • Unit - Change ownership of HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[(Player number of (Triggering player))]]] to (Triggering player) and Change color
      • Unit - Unpause HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[(Player number of (Triggering player))]]]
      • Hero - Create |cFFFFFF00Healing Potion and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[(Player number of (Triggering player))]]]
      • Item - Set charges remaining in (Last created item) to 15
      • Hero - Create |cFFFFFF00Mana Potion and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[(Player number of (Triggering player))]]]
      • Item - Set charges remaining in (Last created item) to 15
      • Hero - Create |cFFFFFF00Ankh of Reincarnation and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[(Player number of (Triggering player))]]]
      • Special Effect - Create a special effect attached to the origin of HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[(Player number of (Triggering player))]]] using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
      • Special Effect - Destroy (Last created special effect)
      • Selection - Select HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[(Player number of (Triggering player))]]] for (Triggering player)
      • Floating Text - Destroy HeroSelection_FloatingText[RandomHeroData[RandomHeroInt[(Player number of (Triggering player))]]]
      • Set RandomHeroData[RandomHeroInt[(Integer A)]] = HeroCount
      • Set HeroCount = (HeroCount - 1)
      • Unit Group - Remove HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[(Player number of (Triggering player))]]] from HeroSelection_AvailableHeroes
      • Custom script: call RemoveLocation(udg_TempPoint)
  • Random Player 1
    • Events
      • Player - Player 1 (Red) types a chat message containing -random as An exact match
    • Conditions
      • HeroSelection_PlayerChosen[(Player number of (Triggering player))] Equal to False
    • Actions
      • Set PlayerGroup = (Player group((Triggering player)))
      • Game - Display to PlayerGroup the text: |c00FFD700You will ...
      • Custom script: call DestroyForce(udg_PlayerGroup)
      • Trigger - Turn off (This trigger)
      • Wait 5.00 seconds
      • Set HeroSelection_PlayerChosen[(Player number of (Triggering player))] = True
      • Set RandomHeroInt[1] = (Random integer number between 1 and HeroCount)
      • Set TempPoint = (Center of Return from Mission <gen>)
      • Unit - Move HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[1]]] instantly to TempPoint
      • Unit - Change ownership of HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[1]]] to (Triggering player) and Change color
      • Unit - Unpause HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[1]]]
      • Hero - Create |cFFFFFF00Healing Potion and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[1]]]
      • Item - Set charges remaining in (Last created item) to 15
      • Hero - Create |cFFFFFF00Mana Potion and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[1]]]
      • Item - Set charges remaining in (Last created item) to 15
      • Hero - Create |cFFFFFF00Ankh of Reincarnation and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[1]]]
      • Special Effect - Create a special effect attached to the origin of HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[1]]] using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
      • Special Effect - Destroy (Last created special effect)
      • Camera - Pan camera for (Triggering player) to TempPoint over 0.00 seconds
      • Selection - Select HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[1]]] for (Triggering player)
      • Floating Text - Destroy HeroSelection_FloatingText[RandomHeroData[RandomHeroInt[1]]]
      • Set RandomHeroData[RandomHeroInt[1]] = HeroCount
      • Set HeroCount = (HeroCount - 1)
      • Unit Group - Remove HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[1]]] from HeroSelection_AvailableHeroes
      • Custom script: call RemoveLocation(udg_TempPoint)
  • Random Player 2
    • Events
      • Player - Player 2 (Blue) types a chat message containing -random as An exact match
    • Conditions
      • HeroSelection_PlayerChosen[(Player number of (Triggering player))] Equal to False
    • Actions
      • Set PlayerGroup = (Player group((Triggering player)))
      • Game - Display to PlayerGroup the text: |c00FFD700You will ...
      • Custom script: call DestroyForce(udg_PlayerGroup)
      • Trigger - Turn off (This trigger)
      • Wait 5.00 seconds
      • Set HeroSelection_PlayerChosen[(Player number of (Triggering player))] = True
      • Set RandomHeroInt[2] = (Random integer number between 1 and HeroCount)
      • Set TempPoint = (Center of Return from Mission <gen>)
      • Unit - Move HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[2]]] instantly to TempPoint
      • Unit - Change ownership of HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[2]]] to (Triggering player) and Change color
      • Unit - Unpause HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[2]]]
      • Hero - Create |cFFFFFF00Healing Potion and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[2]]]
      • Item - Set charges remaining in (Last created item) to 15
      • Hero - Create |cFFFFFF00Mana Potion and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[2]]]
      • Item - Set charges remaining in (Last created item) to 15
      • Hero - Create |cFFFFFF00Ankh of Reincarnation and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[2]]]
      • Special Effect - Create a special effect attached to the origin of HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[2]]] using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
      • Special Effect - Destroy (Last created special effect)
      • Camera - Pan camera for (Triggering player) to TempPoint over 0.00 seconds
      • Selection - Select HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[2]]] for (Triggering player)
      • Floating Text - Destroy HeroSelection_FloatingText[RandomHeroData[RandomHeroInt[2]]]
      • Set RandomHeroData[RandomHeroInt[2]] = HeroCount
      • Set HeroCount = (HeroCount - 1)
      • Unit Group - Remove HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[2]]] from HeroSelection_AvailableHeroes
      • Custom script: call RemoveLocation(udg_TempPoint)
  • Random Player 3
    • Events
      • Player - Player 3 (Teal) types a chat message containing -random as An exact match
    • Conditions
      • HeroSelection_PlayerChosen[(Player number of (Triggering player))] Equal to False
    • Actions
      • Set PlayerGroup = (Player group((Triggering player)))
      • Game - Display to PlayerGroup the text: |c00FFD700You will ...
      • Custom script: call DestroyForce(udg_PlayerGroup)
      • Trigger - Turn off (This trigger)
      • Wait 5.00 seconds
      • Set HeroSelection_PlayerChosen[(Player number of (Triggering player))] = True
      • Set RandomHeroInt[3] = (Random integer number between 1 and HeroCount)
      • Set TempPoint = (Center of Return from Mission <gen>)
      • Unit - Move HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[3]]] instantly to TempPoint
      • Unit - Change ownership of HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[3]]] to (Triggering player) and Change color
      • Unit - Unpause HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[3]]]
      • Hero - Create |cFFFFFF00Healing Potion and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[3]]]
      • Item - Set charges remaining in (Last created item) to 15
      • Hero - Create |cFFFFFF00Mana Potion and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[3]]]
      • Item - Set charges remaining in (Last created item) to 15
      • Hero - Create |cFFFFFF00Ankh of Reincarnation and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[3]]]
      • Special Effect - Create a special effect attached to the origin of HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[3]]] using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
      • Special Effect - Destroy (Last created special effect)
      • Camera - Pan camera for (Triggering player) to TempPoint over 0.00 seconds
      • Selection - Select HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[3]]] for (Triggering player)
      • Floating Text - Destroy HeroSelection_FloatingText[RandomHeroData[RandomHeroInt[3]]]
      • Set RandomHeroData[RandomHeroInt[3]] = HeroCount
      • Set HeroCount = (HeroCount - 1)
      • Unit Group - Remove HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[3]]] from HeroSelection_AvailableHeroes
      • Custom script: call RemoveLocation(udg_TempPoint)
  • Random Player 4
    • Events
      • Player - Player 4 (Purple) types a chat message containing -random as An exact match
    • Conditions
      • HeroSelection_PlayerChosen[(Player number of (Triggering player))] Equal to False
    • Actions
      • Set PlayerGroup = (Player group((Triggering player)))
      • Game - Display to PlayerGroup the text: |c00FFD700You will ...
      • Custom script: call DestroyForce(udg_PlayerGroup)
      • Trigger - Turn off (This trigger)
      • Wait 5.00 seconds
      • Set HeroSelection_PlayerChosen[(Player number of (Triggering player))] = True
      • Set RandomHeroInt[4] = (Random integer number between 1 and HeroCount)
      • Set TempPoint = (Center of Return from Mission <gen>)
      • Unit - Move HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[4]]] instantly to TempPoint
      • Unit - Change ownership of HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[4]]] to (Triggering player) and Change color
      • Unit - Unpause HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[4]]]
      • Hero - Create |cFFFFFF00Healing Potion and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[4]]]
      • Item - Set charges remaining in (Last created item) to 15
      • Hero - Create |cFFFFFF00Mana Potion and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[4]]]
      • Item - Set charges remaining in (Last created item) to 15
      • Hero - Create |cFFFFFF00Ankh of Reincarnation and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[4]]]
      • Special Effect - Create a special effect attached to the origin of HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[4]]] using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
      • Special Effect - Destroy (Last created special effect)
      • Camera - Pan camera for (Triggering player) to TempPoint over 0.00 seconds
      • Selection - Select HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[4]]] for (Triggering player)
      • Floating Text - Destroy HeroSelection_FloatingText[RandomHeroData[RandomHeroInt[4]]]
      • Set RandomHeroData[RandomHeroInt[4]] = HeroCount
      • Set HeroCount = (HeroCount - 1)
      • Unit Group - Remove HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[4]]] from HeroSelection_AvailableHeroes
      • Custom script: call RemoveLocation(udg_TempPoint)
  • Random Player 5
    • Events
      • Player - Player 5 (Yellow) types a chat message containing -random as An exact match
    • Conditions
      • HeroSelection_PlayerChosen[(Player number of (Triggering player))] Equal to False
    • Actions
      • Set PlayerGroup = (Player group((Triggering player)))
      • Game - Display to PlayerGroup the text: |c00FFD700You will ...
      • Custom script: call DestroyForce(udg_PlayerGroup)
      • Trigger - Turn off (This trigger)
      • Wait 5.00 seconds
      • Set HeroSelection_PlayerChosen[(Player number of (Triggering player))] = True
      • Set RandomHeroInt[5] = (Random integer number between 1 and HeroCount)
      • Set TempPoint = (Center of Return from Mission <gen>)
      • Unit - Move HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[5]]] instantly to TempPoint
      • Unit - Change ownership of HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[5]]] to (Triggering player) and Change color
      • Unit - Unpause HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[5]]]
      • Hero - Create |cFFFFFF00Healing Potion and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[5]]]
      • Item - Set charges remaining in (Last created item) to 15
      • Hero - Create |cFFFFFF00Mana Potion and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[5]]]
      • Item - Set charges remaining in (Last created item) to 15
      • Hero - Create |cFFFFFF00Ankh of Reincarnation and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[5]]]
      • Special Effect - Create a special effect attached to the origin of HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[5]]] using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
      • Special Effect - Destroy (Last created special effect)
      • Camera - Pan camera for (Triggering player) to TempPoint over 0.00 seconds
      • Selection - Select HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[5]]] for (Triggering player)
      • Floating Text - Destroy HeroSelection_FloatingText[RandomHeroData[RandomHeroInt[5]]]
      • Set RandomHeroData[RandomHeroInt[5]] = HeroCount
      • Set HeroCount = (HeroCount - 1)
      • Unit Group - Remove HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[5]]] from HeroSelection_AvailableHeroes
      • Custom script: call RemoveLocation(udg_TempPoint)
  • Random Player 6
    • Events
      • Player - Player 6 (Orange) types a chat message containing -random as An exact match
    • Conditions
      • HeroSelection_PlayerChosen[(Player number of (Triggering player))] Equal to False
    • Actions
      • Set PlayerGroup = (Player group((Triggering player)))
      • Game - Display to PlayerGroup the text: |c00FFD700You will ...
      • Custom script: call DestroyForce(udg_PlayerGroup)
      • Trigger - Turn off (This trigger)
      • Wait 5.00 seconds
      • Set HeroSelection_PlayerChosen[(Player number of (Triggering player))] = True
      • Set RandomHeroInt[6] = (Random integer number between 1 and HeroCount)
      • Set TempPoint = (Center of Return from Mission <gen>)
      • Unit - Move HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[6]]] instantly to TempPoint
      • Unit - Change ownership of HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[6]]] to (Triggering player) and Change color
      • Unit - Unpause HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[6]]]
      • Hero - Create |cFFFFFF00Healing Potion and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[6]]]
      • Item - Set charges remaining in (Last created item) to 15
      • Hero - Create |cFFFFFF00Mana Potion and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[6]]]
      • Item - Set charges remaining in (Last created item) to 15
      • Hero - Create |cFFFFFF00Ankh of Reincarnation and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[6]]]
      • Special Effect - Create a special effect attached to the origin of HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[6]]] using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
      • Special Effect - Destroy (Last created special effect)
      • Camera - Pan camera for (Triggering player) to TempPoint over 0.00 seconds
      • Selection - Select HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[6]]] for (Triggering player)
      • Floating Text - Destroy HeroSelection_FloatingText[RandomHeroData[RandomHeroInt[6]]]
      • Set RandomHeroData[RandomHeroInt[6]] = HeroCount
      • Set HeroCount = (HeroCount - 1)
      • Unit Group - Remove HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[6]]] from HeroSelection_AvailableHeroes
      • Custom script: call RemoveLocation(udg_TempPoint)
  • Random Player 7
    • Events
      • Player - Player 7 (Green) types a chat message containing -random as An exact match
    • Conditions
      • HeroSelection_PlayerChosen[(Player number of (Triggering player))] Equal to False
    • Actions
      • Set PlayerGroup = (Player group((Triggering player)))
      • Game - Display to PlayerGroup the text: |c00FFD700You will ...
      • Custom script: call DestroyForce(udg_PlayerGroup)
      • Trigger - Turn off (This trigger)
      • Wait 5.00 seconds
      • Set HeroSelection_PlayerChosen[(Player number of (Triggering player))] = True
      • Set RandomHeroInt[7] = (Random integer number between 1 and HeroCount)
      • Set TempPoint = (Center of Return from Mission <gen>)
      • Unit - Move HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[7]]] instantly to TempPoint
      • Unit - Change ownership of HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[7]]] to (Triggering player) and Change color
      • Unit - Unpause HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[7]]]
      • Hero - Create |cFFFFFF00Healing Potion and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[7]]]
      • Item - Set charges remaining in (Last created item) to 15
      • Hero - Create |cFFFFFF00Mana Potion and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[7]]]
      • Item - Set charges remaining in (Last created item) to 15
      • Hero - Create |cFFFFFF00Ankh of Reincarnation and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[7]]]
      • Special Effect - Create a special effect attached to the origin of HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[7]]] using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
      • Special Effect - Destroy (Last created special effect)
      • Camera - Pan camera for (Triggering player) to TempPoint over 0.00 seconds
      • Selection - Select HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[7]]] for (Triggering player)
      • Floating Text - Destroy HeroSelection_FloatingText[RandomHeroData[RandomHeroInt[7]]]
      • Set RandomHeroData[RandomHeroInt[7]] = HeroCount
      • Set HeroCount = (HeroCount - 1)
      • Unit Group - Remove HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[7]]] from HeroSelection_AvailableHeroes
      • Custom script: call RemoveLocation(udg_TempPoint)
  • Random Player 8
    • Events
      • Player - Player 8 (Pink) types a chat message containing -random as An exact match
    • Conditions
      • HeroSelection_PlayerChosen[(Player number of (Triggering player))] Equal to False
    • Actions
      • Set PlayerGroup = (Player group((Triggering player)))
      • Game - Display to PlayerGroup the text: |c00FFD700You will ...
      • Custom script: call DestroyForce(udg_PlayerGroup)
      • Trigger - Turn off (This trigger)
      • Wait 5.00 seconds
      • Set HeroSelection_PlayerChosen[(Player number of (Triggering player))] = True
      • Set RandomHeroInt[8] = (Random integer number between 1 and HeroCount)
      • Set TempPoint = (Center of Return from Mission <gen>)
      • Unit - Move HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[8]]] instantly to TempPoint
      • Unit - Change ownership of HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[8]]] to (Triggering player) and Change color
      • Unit - Unpause HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[8]]]
      • Hero - Create |cFFFFFF00Healing Potion and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[8]]]
      • Item - Set charges remaining in (Last created item) to 15
      • Hero - Create |cFFFFFF00Mana Potion and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[8]]]
      • Item - Set charges remaining in (Last created item) to 15
      • Hero - Create |cFFFFFF00Ankh of Reincarnation and give it to HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[8]]]
      • Special Effect - Create a special effect attached to the origin of HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[8]]] using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
      • Special Effect - Destroy (Last created special effect)
      • Camera - Pan camera for (Triggering player) to TempPoint over 0.00 seconds
      • Selection - Select HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[8]]] for (Triggering player)
      • Floating Text - Destroy HeroSelection_FloatingText[RandomHeroData[RandomHeroInt[8]]]
      • Set RandomHeroData[RandomHeroInt[8]] = HeroCount
      • Set HeroCount = (HeroCount - 1)
      • Unit Group - Remove HeroSelection_HeroUnit[RandomHeroData[RandomHeroInt[8]]] from HeroSelection_AvailableHeroes
      • Custom script: call RemoveLocation(udg_TempPoint)
  • Repick
    • Events
      • Player - Player 1 (Red) types a chat message containing -repick as An exact match
      • Player - Player 2 (Blue) types a chat message containing -repick as An exact match
      • Player - Player 3 (Teal) types a chat message containing -repick as An exact match
      • Player - Player 4 (Purple) types a chat message containing -repick as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -repick as An exact match
      • Player - Player 6 (Orange) types a chat message containing -repick as An exact match
      • Player - Player 7 (Green) types a chat message containing -repick as An exact match
      • Player - Player 8 (Pink) types a chat message containing -repick as An exact match
    • Conditions
      • HeroSelection_PlayerChosen[(Player number of (Triggering player))] Equal to True
      • Repick_Boolean[(Player number of (Triggering player))] Equal to False
    • Actions
      • Set HeroSelection_PlayerChosen[(Player number of (Triggering player))] = False
      • Set Repick_Boolean[(Player number of (Triggering player))] = True
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
          • Unit Group - Remove (Picked unit) from HeroSelection_AvailableHeroes
      • Set PlayerGroup = (Player group((Triggering player)))
      • Game - Display to PlayerGroup the text: |c00FFD700You can p...
      • Custom script: call DestroyForce(udg_PlayerGroup)
      • Set TempPoint = (Center of Hero Pick Visibility <gen>)
      • Camera - Pan camera for (Triggering player) to TempPoint over 0.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)
Take you time :)
 
Status
Not open for further replies.
Top