So for my hero map I have added in computers and such and tested having all 8 computers playing and me being an observer and when the timer expired and they were "picking" their heroes I got a massive lag spike. I've tried putting in a single computer and there's a bit there too. Also a lil bit when I pick one myself.
The first trigger is for the computer players and is triggered by a separate trigger that is triggered by an elapsed time trigger. The bottom 2 are for when a hero picks a hero where the first one triggers the second one.
-
AI Pick Hero
-

Events
-

Conditions
-

Actions
-


Player Group - Pick every player in AIPlayerGroup and do (Actions)
-



Loop - Actions
-




Set AITempPlayer = (Picked player)
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






PlayerHero[(Player number of AITempPlayer)] Equal to No unit
-
-





Then - Actions
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








Or - Any (Conditions) are true
-









Conditions
-










AITempPlayer Equal to Player 1 (Red)
-










AITempPlayer Equal to Player 2 (Blue)
-










AITempPlayer Equal to Player 3 (Teal)
-










AITempPlayer Equal to Player 4 (Purple)
-
-
-
-







Then - Actions
-








Set TempPoint = (Random point in NorthHeroSpawn <gen>)
-
-







Else - Actions
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










Or - Any (Conditions) are true
-











Conditions
-












AITempPlayer Equal to Player 5 (Yellow)
-












AITempPlayer Equal to Player 6 (Orange)
-












AITempPlayer Equal to Player 7 (Green)
-












AITempPlayer Equal to Player 8 (Pink)
-
-
-
-









Then - Actions
-










Set TempPoint = (Random point in SouthHeroSpawn <gen>)
-
-









Else - Actions
-
-
-
-






Set AIRandomInt = (Random integer number between 2 and 9)
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








AIRandomInt Equal to 1
-








HeroUsed[1] Equal to False
-
-







Then - Actions
-








Unit - Create 1 Blood Elf Champion for AITempPlayer at TempPoint facing Default building facing degrees
-








Set PlayerHero[(Player number of AITempPlayer)] = (Last created unit)
-








Neutral Building - Remove Blood Elf Champion from all marketplaces
-








Hero - Learn skill for (Last created unit): Sword of Leaders
-








Unit Group - Add (Last created unit) to HeroStr
-








Set HeroUsed[1] = True
-








Trigger - Turn on AI Hero 1 Blood Elf Champion <gen>
-
-







Else - Actions
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










AIRandomInt Equal to 2
-










HeroUsed[2] Equal to False
-
-









Then - Actions
-










Unit - Create 1 Sealed Python for AITempPlayer at TempPoint facing Default building facing degrees
-










Set PlayerHero[(Player number of AITempPlayer)] = (Last created unit)
-










Neutral Building - Remove Sealed Python from all marketplaces
-










Hero - Learn skill for (Last created unit): Summon Reef Elemental
-










Unit Group - Add (Last created unit) to HeroInt
-










Set HeroUsed[2] = True
-










Trigger - Turn on AI Hero 2 Sealed Python <gen>
-
-









Else - Actions
-










If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-











If - Conditions
-












AIRandomInt Equal to 3
-












HeroUsed[3] Equal to False
-
-











Then - Actions
-












Unit - Create 1 Crystal Lord for AITempPlayer at TempPoint facing Default building facing degrees
-












Set PlayerHero[(Player number of AITempPlayer)] = (Last created unit)
-












Neutral Building - Remove Crystal Lord from all marketplaces
-












Hero - Learn skill for (Last created unit): Pulverize
-












Unit Group - Add (Last created unit) to HeroStr
-












Set HeroUsed[3] = True
-












Trigger - Turn on AI Hero 3 Crystal Lord <gen>
-
-











Else - Actions
-












If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-













If - Conditions
-














AIRandomInt Equal to 4
-














HeroUsed[4] Equal to False
-
-













Then - Actions
-














Unit - Create 1 Flower Dryad for AITempPlayer at TempPoint facing Default building facing degrees
-














Set PlayerHero[(Player number of AITempPlayer)] = (Last created unit)
-














Neutral Building - Remove Flower Dryad from all marketplaces
-














Hero - Learn skill for (Last created unit): Faerie Fire
-














Unit Group - Add (Last created unit) to HeroInt
-














Set HeroUsed[4] = True
-














Trigger - Turn on AI Hero 4 Flower Dryad <gen>
-
-













Else - Actions
-














If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-















If - Conditions
-
















AIRandomInt Equal to 5
-
















HeroUsed[5] Equal to False
-
-















Then - Actions
-
















Unit - Create 1 Nerubian Mauler for AITempPlayer at TempPoint facing Default building facing degrees
-
















Set PlayerHero[(Player number of AITempPlayer)] = (Last created unit)
-
















Neutral Building - Remove Nerubian Mauler from all marketplaces
-
















Hero - Learn skill for (Last created unit): Unholy Aura
-
















Unit Group - Add (Last created unit) to HeroAgi
-
















Set HeroUsed[5] = True
-
















Trigger - Turn on AI Hero 5 Nerubian Mauler <gen>
-
-















Else - Actions
-
















If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-

















If - Conditions
-


















AIRandomInt Equal to 6
-


















HeroUsed[6] Equal to False
-
-

















Then - Actions
-


















Unit - Create 1 Goblin Gunner for AITempPlayer at TempPoint facing Default building facing degrees
-


















Set PlayerHero[(Player number of AITempPlayer)] = (Last created unit)
-


















Neutral Building - Remove Goblin Gunner from all marketplaces
-


















Hero - Learn skill for (Last created unit): Pride of War
-


















Unit Group - Add (Last created unit) to HeroAgi
-


















Set HeroUsed[6] = True
-


















Trigger - Turn on AI Hero 6 Goblin Gunner <gen>
-
-

















Else - Actions
-


















If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



















If - Conditions
-




















AIRandomInt Equal to 7
-




















HeroUsed[7] Equal to False
-
-



















Then - Actions
-




















Unit - Create 1 Soul Devourer for AITempPlayer at TempPoint facing Default building facing degrees
-




















Set PlayerHero[(Player number of AITempPlayer)] = (Last created unit)
-




















Neutral Building - Remove Soul Devourer from all marketplaces
-




















Hero - Learn skill for (Last created unit): Siphon Aura
-




















Unit Group - Add (Last created unit) to HeroStr
-




















Set HeroUsed[7] = True
-




















Trigger - Turn on AI Hero 7 Soul Devourer <gen>
-
-



















Else - Actions
-




















If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





















If - Conditions
-






















AIRandomInt Equal to 8
-






















HeroUsed[8] Equal to False
-
-





















Then - Actions
-






















Unit - Create 1 Overqueen for AITempPlayer at TempPoint facing Default building facing degrees
-






















Set PlayerHero[(Player number of AITempPlayer)] = (Last created unit)
-






















Neutral Building - Remove Overqueen from all marketplaces
-






















Hero - Learn skill for (Last created unit): Shadow Strike
-






















Unit Group - Add (Last created unit) to HeroAgi
-






















Set HeroUsed[8] = True
-






















Trigger - Turn on AI Hero 8 Overqueen <gen>
-
-





















Else - Actions
-






















If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-























If - Conditions
-
























AIRandomInt Equal to 9
-
























HeroUsed[9] Equal to False
-
-























Then - Actions
-
























Unit - Create 1 Ogre Gladiator for AITempPlayer at TempPoint facing Default building facing degrees
-
























Set PlayerHero[(Player number of AITempPlayer)] = (Last created unit)
-
























Neutral Building - Remove Ogre Gladiator from all marketplaces
-
























Hero - Learn skill for (Last created unit): Command Aura
-
























Unit Group - Add (Last created unit) to HeroStr
-
























Set HeroUsed[9] = True
-
























Trigger - Turn on AI Hero 9 Ogre Gladiator <gen>
-
-























Else - Actions
-
























Trigger - Run (This trigger) (checking conditions)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-





Else - Actions
-
-
-
-
-
-
Hero Picked
-

Events
-


Unit - A unit Sells a unit
-
-

Conditions
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




Or - Any (Conditions) are true
-





Conditions
-






(Unit-type of (Selling unit)) Equal to Agilty Tavern
-






(Unit-type of (Selling unit)) Equal to Intelligence Tavern
-






(Unit-type of (Selling unit)) Equal to Strength Tavern
-
-
-
-



Then - Actions
-




Set TempUnit = (Buying unit)
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






Or - Any (Conditions) are true
-







Conditions
-








(Owner of TempUnit) Equal to Player 1 (Red)
-








(Owner of TempUnit) Equal to Player 2 (Blue)
-








(Owner of TempUnit) Equal to Player 3 (Teal)
-








(Owner of TempUnit) Equal to Player 4 (Purple)
-
-
-
-





Then - Actions
-






Set TempPoint = (Random point in NorthHeroSpawn <gen>)
-
-





Else - Actions
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








Or - Any (Conditions) are true
-









Conditions
-










(Owner of TempUnit) Equal to Player 5 (Yellow)
-










(Owner of TempUnit) Equal to Player 6 (Orange)
-










(Owner of TempUnit) Equal to Player 7 (Green)
-










(Owner of TempUnit) Equal to Player 8 (Pink)
-
-
-
-







Then - Actions
-








Set TempPoint = (Random point in SouthHeroSpawn <gen>)
-
-







Else - Actions
-
-
-
-




Unit - Move (Sold unit) instantly to TempPoint
-




Camera - Pan camera for (Owner of (Sold unit)) to TempPoint over 2.00 seconds
-




Neutral Building - Remove (Unit-type of (Sold unit)) from all marketplaces
-




Set PlayerHero[(Player number of (Owner of (Sold unit)))] = (Sold unit)
-




Trigger - Run Check Hero <gen> (checking conditions)
-
-



Else - Actions
-
-
-
-
Check Hero
-

Events
-

Conditions
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Unit-type of (Last created unit)) Equal to Blood Elf Champion
-
-



Then - Actions
-




Set HeroUsed[1] = True
-
-



Else - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Unit-type of (Last created unit)) Equal to Sealed Python
-
-





Then - Actions
-






Set HeroUsed[2] = True
-
-





Else - Actions
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








(Unit-type of (Last created unit)) Equal to Crystal Lord
-
-







Then - Actions
-








Set HeroUsed[3] = True
-
-







Else - Actions
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










(Unit-type of (Last created unit)) Equal to Flower Dryad
-
-









Then - Actions
-










Set HeroUsed[4] = True
-
-









Else - Actions
-










If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-











If - Conditions
-












(Unit-type of (Last created unit)) Equal to Nerubian Mauler
-
-











Then - Actions
-












Set HeroUsed[5] = True
-
-











Else - Actions
-












If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-













If - Conditions
-














(Unit-type of (Last created unit)) Equal to Goblin Gunner
-
-













Then - Actions
-














Set HeroUsed[6] = True
-
-













Else - Actions
-














If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-















If - Conditions
-
















(Unit-type of (Last created unit)) Equal to Soul Devourer
-
-















Then - Actions
-
















Set HeroUsed[7] = True
-
-















Else - Actions
-
















If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-

















If - Conditions
-


















(Unit-type of (Last created unit)) Equal to Overqueen
-
-

















Then - Actions
-


















Set HeroUsed[8] = True
-
-

















Else - Actions
-


















If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



















If - Conditions
-




















(Unit-type of (Last created unit)) Equal to Ogre Gladiator
-
-



















Then - Actions
-




















Set HeroUsed[9] = True
-
-



















Else - Actions
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
The first trigger is for the computer players and is triggered by a separate trigger that is triggered by an elapsed time trigger. The bottom 2 are for when a hero picks a hero where the first one triggers the second one.

