Save everything in the hashtable... you wont even need the variables anymore... I will use
string hash to avoid confusions, but you can use direct integers... ^_^
All of the first keys in the hashtable are Strings...
-
Unit Group - Remove (Triggering unit) from EruptionPick
-
Set EruptionPick = (Last created unit group)
-
Unit - Turn collision for (Picked unit) Off
-
Set EruptionUnitPoint = (Position of (Picked unit))
-
Hashtable - Save (Angle from EruptionPoint to EruptionUnitPoint) as Key(Angle) of Key(PickedUnit) in Helltable
-
Hashtable - Save 30.00 as Key(KnockbackSpeed) of Key(PickedUnit) in Helltable
-
Hashtable - Save 30.00 as Key(KnockbackHeight) of Key(PickedUnit) in Helltable
-
Unit Group - Add (Picked unit) to EruptionGroup
-
Unit Group - Remove (Triggering unit) from EruptionGroup
-
Unit - Turn collision for (Triggering unit) On
-
Custom script: call DestroyGroup ( udg_EruptionPick )
other note, you should transfer this lines to outside the group loop to save function calls...
Unit Group - Remove all units of (Units owned by (Owner of (Triggering unit))) from EruptionGroup
Unit Group - Remove all units of (Units owned by (Owner of (Triggering unit))) from EruptionPick
another note: you dont need the DestroyGroup there anymore, coz you already set_bjwantdestroygroup to false...
now on your periodic loop, instead of using the arrays, just load those hashtable values
example:
-
Hashtable - Save (Load Key(KnockBackSpeed) of (Key (Picked unit)) from Helltable) - 0.75) as Key(KnockBackSpeed) of (Key (Picked unit)) from Helltable
another example:
-
Animation - Change (Picked unit) flying height to (Load Key(KnockBackHeight) of (Key (Picked unit)) from Helltable) at 1000000000.00
And one note: This will be completely MUI and will work the same as your current trigger
Oh, you still have lots of location leaks... transfer this to the Else - Actions, coz on they're current location (at the end of the trigger) they only clear the last position created but all positions before that will leak...
Custom script: call RemoveLocation ( udg_KnockbackCurrentPoint )
Custom script: call RemoveLocation ( udg_KnockbackPoint )
now, I agree with Pharaoh_, that this spell needs an overhaul...
now, dont make haste, fix it little by little... ^_^