When a user selects a random hero this trigger runs and all players in the game experience a minor 2 second game freeze. Any thoughts on what could cause this delay?
-
random hero
-
Events
-
Unit - A unit enters safezone <gen>
-
-
Conditions
-
(Unit-type of (Triggering unit)) Equal to Random Hero
-
-
Actions
-
Set RandomInteger = (Random integer number between 1 and herocount)
-
Unit - Remove (Triggering unit) from the game
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Owner of (Triggering unit)) Equal to Player 1 (Red)
-
(Owner of (Triggering unit)) Equal to Player 3 (Teal)
-
(Owner of (Triggering unit)) Equal to Player 5 (Yellow)
-
(Owner of (Triggering unit)) Equal to Player 7 (Green)
-
(Owner of (Triggering unit)) Equal to Player 9 (Gray)
-
-
-
-
Then - Actions
-
Set Location = (Center of northherospawn <gen>)
-
Camera - Pan camera for (Owner of (Triggering unit)) to Location over 0.00 seconds
-
Unit - Create 1 randomhero[RandomInteger] for (Owner of (Triggering unit)) at Location facing Default building facing degrees
-
Unit Group - Add (Last created unit) to heros
-
Game - Display to (All players) for 8.00 seconds the text: ((playercolour[(Player number of (Owner of (Triggering unit)))] + ((Name of (Owner of (Triggering unit))) + |r)) + has chosen a Random Hero and recieved an extra 200 gold!)
-
Player - Add 200 to (Owner of (Triggering unit)) Current gold
-
Custom script: call RemoveLocation(udg_Location)
-
-
Else - Actions
-
Set Location = (Center of southherospawn <gen>)
-
Camera - Pan camera for (Owner of (Triggering unit)) to Location over 0.00 seconds
-
Unit - Create 1 randomhero[RandomInteger] for (Owner of (Triggering unit)) at Location facing Default building facing degrees
-
Unit Group - Add (Last created unit) to heros
-
Game - Display to (All players) for 8.00 seconds the text: ((playercolour[(Player number of (Owner of (Triggering unit)))] + ((Name of (Owner of (Triggering unit))) + |r)) + has chosen a Random Hero and recieved an extra 200 gold!)
-
Player - Add 200 to (Owner of (Triggering unit)) Current gold
-
Custom script: call RemoveLocation(udg_Location)
-
-
-
Set RandomInteger = 0
-
-