- Joined
- May 11, 2012
- Messages
- 2,108
Hello.
Can someone take a deep look into this and tell me the reason why this spell sometimes bugs out (such as one instance lingers and the spheres don't attack NOR get destroyed.)?
It does not occur every time, only when I'm starting to spam it REALLY hard (like 50+ instances) and when I'm doing some heavy actions ingame (fightning hordes and hordes of creeps).
Omg I forgot to post spell...
Anyway:
Can someone take a deep look into this and tell me the reason why this spell sometimes bugs out (such as one instance lingers and the spheres don't attack NOR get destroyed.)?
It does not occur every time, only when I'm starting to spam it REALLY hard (like 50+ instances) and when I'm doing some heavy actions ingame (fightning hordes and hordes of creeps).
Omg I forgot to post spell...
Anyway:
-
Lightning Sphere
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Lightning Sphere
-
-
Actions
-
-------- ------------------------------------------------------------------------------------- --------
-
Set LS_MaxIndex = (LS_MaxIndex + 1)
-
Set LS_TrigUnit[LS_MaxIndex] = (Triggering unit)
-
Set LS_SpellLvl[LS_MaxIndex] = (Level of Lightning Sphere for LS_TrigUnit[LS_MaxIndex])
-
Set LS_Point[1] = (Position of LS_TrigUnit[LS_MaxIndex])
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Set LS_Angle1[LS_MaxIndex] = 72.00
-
Set LS_Point[2] = (LS_Point[1] offset by 150.00 towards LS_Angle1[LS_MaxIndex] degrees)
-
Unit - Create 1 LS_SphereType[LS_SpellLvl[LS_MaxIndex]] for (Owner of LS_TrigUnit[LS_MaxIndex]) at LS_Point[2] facing Default building facing degrees
-
Set LS_Sphere1[LS_MaxIndex] = (Last created unit)
-
Unit - Add a LS_Duration[LS_SpellLvl[LS_MaxIndex]] second Generic expiration timer to LS_Sphere1[LS_MaxIndex]
-
Custom script: call RemoveLocation(udg_LS_Point[2])
-
-------- = --------
-
Set LS_Angle2[LS_MaxIndex] = 144.00
-
Set LS_Point[2] = (LS_Point[1] offset by 150.00 towards LS_Angle2[LS_MaxIndex] degrees)
-
Unit - Create 1 LS_SphereType[LS_SpellLvl[LS_MaxIndex]] for (Owner of LS_TrigUnit[LS_MaxIndex]) at LS_Point[2] facing Default building facing degrees
-
Set LS_Sphere2[LS_MaxIndex] = (Last created unit)
-
Unit - Add a LS_Duration[LS_SpellLvl[LS_MaxIndex]] second Generic expiration timer to LS_Sphere2[LS_MaxIndex]
-
Custom script: call RemoveLocation(udg_LS_Point[2])
-
-------- = --------
-
Set LS_Angle3[LS_MaxIndex] = 216.00
-
Set LS_Point[2] = (LS_Point[1] offset by 150.00 towards LS_Angle3[LS_MaxIndex] degrees)
-
Unit - Create 1 LS_SphereType[LS_SpellLvl[LS_MaxIndex]] for (Owner of LS_TrigUnit[LS_MaxIndex]) at LS_Point[2] facing Default building facing degrees
-
Set LS_Sphere3[LS_MaxIndex] = (Last created unit)
-
Unit - Add a LS_Duration[LS_SpellLvl[LS_MaxIndex]] second Generic expiration timer to LS_Sphere3[LS_MaxIndex]
-
Custom script: call RemoveLocation(udg_LS_Point[2])
-
-------- = --------
-
Set LS_Angle4[LS_MaxIndex] = 288.00
-
Set LS_Point[2] = (LS_Point[1] offset by 150.00 towards LS_Angle4[LS_MaxIndex] degrees)
-
Unit - Create 1 LS_SphereType[LS_SpellLvl[LS_MaxIndex]] for (Owner of LS_TrigUnit[LS_MaxIndex]) at LS_Point[2] facing Default building facing degrees
-
Set LS_Sphere4[LS_MaxIndex] = (Last created unit)
-
Unit - Add a LS_Duration[LS_SpellLvl[LS_MaxIndex]] second Generic expiration timer to LS_Sphere4[LS_MaxIndex]
-
Custom script: call RemoveLocation(udg_LS_Point[2])
-
-------- = --------
-
Set LS_Angle5[LS_MaxIndex] = 360.00
-
Set LS_Point[2] = (LS_Point[1] offset by 150.00 towards LS_Angle5[LS_MaxIndex] degrees)
-
Unit - Create 1 LS_SphereType[LS_SpellLvl[LS_MaxIndex]] for (Owner of LS_TrigUnit[LS_MaxIndex]) at LS_Point[2] facing Default building facing degrees
-
Set LS_Sphere5[LS_MaxIndex] = (Last created unit)
-
Unit - Add a LS_Duration[LS_SpellLvl[LS_MaxIndex]] second Generic expiration timer to LS_Sphere5[LS_MaxIndex]
-
Custom script: call RemoveLocation(udg_LS_Point[2])
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
LS_MaxIndex Equal to 1
-
-
Then - Actions
-
Trigger - Turn on Lightning Sphere Loop <gen>
-
-
Else - Actions
-
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Custom script: call RemoveLocation(udg_LS_Point[1])
-
Custom script: set udg_LS_Point[1] = null
-
Custom script: set udg_LS_Point[2] = null
-
-------- ------------------------------------------------------------------------------------- --------
-
-
-
Lightning Sphere Loop
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
-------- ------------------------------------------------------------------------------------- --------
-
For each (Integer LS_Loop) from 1 to LS_MaxIndex, do (Actions)
-
Loop - Actions
-
-------- ------------------------------------------------------------------------------------- --------
-
Set LS_Point[0] = (Position of LS_TrigUnit[LS_Loop])
-
Set LS_Point[1] = (Position of LS_Sphere1[LS_Loop])
-
Set LS_Point[2] = (Position of LS_Sphere2[LS_Loop])
-
Set LS_Point[3] = (Position of LS_Sphere3[LS_Loop])
-
Set LS_Point[4] = (Position of LS_Sphere4[LS_Loop])
-
Set LS_Point[5] = (Position of LS_Sphere5[LS_Loop])
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Life of LS_Sphere1[LS_Loop]) Less than or equal to 0.00
-
(Life of LS_Sphere2[LS_Loop]) Less than or equal to 0.00
-
(Life of LS_Sphere3[LS_Loop]) Less than or equal to 0.00
-
(Life of LS_Sphere4[LS_Loop]) Less than or equal to 0.00
-
(Life of LS_Sphere5[LS_Loop]) Less than or equal to 0.00
-
-
-
-
Then - Actions
-
-------- ------------------------------------------------------------------------------------- --------
-
Unit - Kill LS_Sphere1[LS_Loop]
-
Unit - Kill LS_Sphere2[LS_Loop]
-
Unit - Kill LS_Sphere3[LS_Loop]
-
Unit - Kill LS_Sphere4[LS_Loop]
-
Unit - Kill LS_Sphere5[LS_Loop]
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Set LS_TrigUnit[LS_Loop] = LS_TrigUnit[LS_MaxIndex]
-
Set LS_TrigUnit[LS_MaxIndex] = No unit
-
Set LS_Sphere1[LS_Loop] = LS_Sphere1[LS_MaxIndex]
-
Set LS_Sphere1[LS_MaxIndex] = No unit
-
Set LS_Sphere2[LS_Loop] = LS_Sphere2[LS_MaxIndex]
-
Set LS_Sphere2[LH_MaxIndex] = No unit
-
Set LS_Sphere3[LS_Loop] = LS_Sphere3[LS_MaxIndex]
-
Set LS_Sphere3[LS_MaxIndex] = No unit
-
Set LS_Sphere4[LS_Loop] = LS_Sphere4[LS_MaxIndex]
-
Set LS_Sphere4[LS_MaxIndex] = No unit
-
Set LS_Sphere5[LS_Loop] = LS_Sphere5[LS_MaxIndex]
-
Set LS_Sphere5[LS_MaxIndex] = No unit
-
Set LS_SpellLvl[LS_Loop] = LS_SpellLvl[LS_MaxIndex]
-
Set LS_Angle1[LS_Loop] = LS_Angle1[LS_MaxIndex]
-
Set LS_Angle2[LS_Loop] = LS_Angle2[LS_MaxIndex]
-
Set LS_Angle3[LS_Loop] = LS_Angle3[LS_MaxIndex]
-
Set LS_Angle4[LS_Loop] = LS_Angle4[LS_MaxIndex]
-
Set LS_Angle5[LS_Loop] = LS_Angle5[LS_MaxIndex]
-
Set LS_MaxIndex = (LS_MaxIndex - 1)
-
Set LS_Loop = (LS_Loop - 1)
-
-------- ------------------------------------------------------------------------------------- --------
-
-
Else - Actions
-
-------- ------------------------------------------------------------------------------------- --------
-
Set LS_Angle1[LS_Loop] = (LS_Angle1[LS_Loop] - 5.00)
-
Set LS_Angle2[LS_Loop] = (LS_Angle2[LS_Loop] - 5.00)
-
Set LS_Angle3[LS_Loop] = (LS_Angle3[LS_Loop] - 5.00)
-
Set LS_Angle4[LS_Loop] = (LS_Angle4[LS_Loop] - 5.00)
-
Set LS_Angle5[LS_Loop] = (LS_Angle5[LS_Loop] - 5.00)
-
Set LS_PointMove[1] = (LS_Point[0] offset by 150.00 towards LS_Angle1[LS_Loop] degrees)
-
Set LS_PointMove[2] = (LS_Point[0] offset by 150.00 towards LS_Angle2[LS_Loop] degrees)
-
Set LS_PointMove[3] = (LS_Point[0] offset by 150.00 towards LS_Angle3[LS_Loop] degrees)
-
Set LS_PointMove[4] = (LS_Point[0] offset by 150.00 towards LS_Angle4[LS_Loop] degrees)
-
Set LS_PointMove[5] = (LS_Point[0] offset by 150.00 towards LS_Angle5[LS_Loop] degrees)
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Custom script: call SetUnitX(udg_LS_Sphere1[udg_LS_Loop], GetLocationX(udg_LS_PointMove[1]))
-
Custom script: call SetUnitY(udg_LS_Sphere1[udg_LS_Loop], GetLocationY(udg_LS_PointMove[1]))
-
Custom script: call SetUnitX(udg_LS_Sphere2[udg_LS_Loop], GetLocationX(udg_LS_PointMove[2]))
-
Custom script: call SetUnitY(udg_LS_Sphere2[udg_LS_Loop], GetLocationY(udg_LS_PointMove[2]))
-
Custom script: call SetUnitX(udg_LS_Sphere3[udg_LS_Loop], GetLocationX(udg_LS_PointMove[3]))
-
Custom script: call SetUnitY(udg_LS_Sphere3[udg_LS_Loop], GetLocationY(udg_LS_PointMove[3]))
-
Custom script: call SetUnitX(udg_LS_Sphere4[udg_LS_Loop], GetLocationX(udg_LS_PointMove[4]))
-
Custom script: call SetUnitY(udg_LS_Sphere4[udg_LS_Loop], GetLocationY(udg_LS_PointMove[4]))
-
Custom script: call SetUnitX(udg_LS_Sphere5[udg_LS_Loop], GetLocationX(udg_LS_PointMove[5]))
-
Custom script: call SetUnitY(udg_LS_Sphere5[udg_LS_Loop], GetLocationY(udg_LS_PointMove[5]))
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Custom script: call RemoveLocation(udg_LS_PointMove[1])
-
Custom script: call RemoveLocation(udg_LS_PointMove[2])
-
Custom script: call RemoveLocation(udg_LS_PointMove[3])
-
Custom script: call RemoveLocation(udg_LS_PointMove[4])
-
Custom script: call RemoveLocation(udg_LS_PointMove[5])
-
-------- ------------------------------------------------------------------------------------- --------
-
-
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Custom script: call RemoveLocation(udg_LS_Point[0])
-
Custom script: call RemoveLocation(udg_LS_Point[1])
-
Custom script: call RemoveLocation(udg_LS_Point[2])
-
Custom script: call RemoveLocation(udg_LS_Point[3])
-
Custom script: call RemoveLocation(udg_LS_Point[4])
-
Custom script: call RemoveLocation(udg_LS_Point[5])
-
-------- ------------------------------------------------------------------------------------- --------
-
-
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
LS_MaxIndex Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Custom script: set udg_LS_Point[0] = null
-
Custom script: set udg_LS_Point[1] = null
-
Custom script: set udg_LS_Point[2] = null
-
Custom script: set udg_LS_Point[3] = null
-
Custom script: set udg_LS_Point[4] = null
-
Custom script: set udg_LS_Point[5] = null
-
Custom script: set udg_LS_PointMove[1] = null
-
Custom script: set udg_LS_PointMove[2] = null
-
Custom script: set udg_LS_PointMove[3] = null
-
Custom script: set udg_LS_PointMove[4] = null
-
Custom script: set udg_LS_PointMove[5] = null
-
-------- ------------------------------------------------------------------------------------- --------
-
-