- Joined
- Mar 16, 2008
- Messages
- 955
Trying to remove the Wait actions from this trigger in hopes or reducing desyncs or other bugs, just to be extra cautious. I was thinking assign the dying units to a variable, checking the array for any unused slots, then use 100s of timers to track their individual respawn time then clear the unit variable. But there must be a better way. Any constructive thoughts appreciated. Thank you.
-
Creep Respawn Loop
-
Events
-
Unit - A unit owned by Neutral Hostile Dies
-
-
Conditions
-
(Unit-type of (Dying unit)) Not equal to Fire Golem (Elemental Boss)
-
(Unit-type of (Dying unit)) Not equal to Leviathan (Elemental Boss)
-
(Unit-type of (Dying unit)) Not equal to Storm (Elemental Boss)
-
(Unit-type of (Dying unit)) Not equal to Penguin King (Elemental Boss)
-
(Unit-type of (Dying unit)) Not equal to Queen of Suffering
-
(Unit-type of (Dying unit)) Not equal to Skull Reaver (Standard)
-
(Unit-type of (Dying unit)) Not equal to Infernal Machine
-
(Unit-type of (Dying unit)) Not equal to Genie
-
(Unit-type of (Dying unit)) Not equal to Satan Incarnate
-
(Unit-type of (Dying unit)) Not equal to Tide Shaman Giant
-
-
Actions
-
Set VariableSet I = (I + 1)
-
Set VariableSet Creep[I] = (Dying unit)
-
Wait 595.00 seconds
-
Set VariableSet J = (J + 1)
-
Unit - Create 1 (Unit-type of Creep[J]) for Neutral Hostile at (Position offset by (X[(Custom value of Creep[J])], Y[(Custom value of Creep[J])])) facing Angle[(Custom value of Creep[J])] degrees
-
Unit - Set the custom value of (Last created unit) to (Custom value of Creep[J])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Map Center <gen> contains (Last created unit)) Equal to True
-
-
Then - Actions
-
Unit - Remove (Last created unit) from the game
-
-
Else - Actions
-
-
-
-
Creep Respawn Initial Start
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Set VariableSet Creeps = (Units owned by Neutral Hostile.)
-
Unit Group - Remove Fire Golem (Elemental Boss) 0687 <gen> from Creeps.
-
Unit Group - Remove Penguin King (Elemental Boss) 0693 <gen> from Creeps.
-
Unit Group - Remove Storm (Elemental Boss) 0802 <gen> from Creeps.
-
Unit Group - Remove Leviathan (Elemental Boss) 0803 <gen> from Creeps.
-
Unit Group - Remove Skull Reaver (Standard) 0232 <gen> from Creeps.
-
Unit Group - Remove Queen of Suffering 0775 <gen> from Creeps.
-
Unit Group - Remove Queen of Suffering 0774 <gen> from Creeps.
-
Unit Group - Remove Infernal Machine 0772 <gen> from Creeps.
-
Unit Group - Remove Infernal Machine 0385 <gen> from Creeps.
-
Unit Group - Remove Skull Reaver (Standard) 0579 <gen> from Creeps.
-
Unit Group - Remove Faceless Priest 0516 <gen> from Creeps.
-
Unit Group - Remove Genie 1507 <gen> from Creeps.
-
Unit Group - Pick every unit in (Units in Hell Region <gen>) and do (Actions)
-
Loop - Actions
-
Unit Group - Remove (Picked unit) from Creeps.
-
-
-
Unit Group - Pick every unit in (Units in (Playable map area) owned by Neutral Hostile) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Picked unit)) Equal to Tide Shaman Giant
-
-
Then - Actions
-
Unit Group - Remove (Picked unit) from Creeps.
-
-
Else - Actions
-
-
-
-
Unit Group - Pick every unit in Creeps and do (Actions)
-
Loop - Actions
-
Set VariableSet I = (I + 1)
-
Unit - Set the custom value of (Picked unit) to I
-
Set VariableSet Angle[I] = (Facing of (Picked unit))
-
Set VariableSet Position = (Position of (Picked unit))
-
Set VariableSet X[I] = (X of Position)
-
Set VariableSet Y[I] = (Y of Position)
-
Custom script: call RemoveLocation(udg_Position)
-
-
-
Set VariableSet I = 0
-
Set VariableSet Position = (Center of (Entire map))
-
-