• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Spell Problem

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,103
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:

  • 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
      • -------- ------------------------------------------------------------------------------------- --------

 
Level 12
Joined
Mar 24, 2011
Messages
1,082
You are not lazy enough...
You can use a simple loop to create all 5 spheres and then modify them in the looping trigger. Another advantage is that hard coding values is a pain in the ass if you want to change them later, smaller code makes it a lot easier. With all these repeated actions it is very easy to do a mistake, like use LS_Angle2 instead of LS_Angle3.
  • -------- ------------------------------------------------------------------------------------- --------
  • 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])
>>>>>>>

  • Set NumSpheres = 5 {Or you can even make it scale with spell level or something, meh...}
  • For each (Integer Temp_Loop) from 1 to NumSpheres do (Actions)
    • Loop - Actions
      • Set LS_Angle[Temp_Loop][LS_MaxIndex] = 360/NumSpheres*Temp_Loop
      • Set LS_Point[2] = (LS_Point[1] offset by 150.00 towards LS_Angle[Temp_Loop][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_Sphere[Temp_Loop][LS_MaxIndex] = (Last created unit)
      • Unit - Add a LS_Duration[LS_SpellLvl[LS_MaxIndex]] second Generic expiration timer to LS_Sphere[TempLoop][LS_MaxIndex]
      • Custom script: call RemoveLocation(udg_LS_Point[2])
Now to the real question. On first glance everything looks fine. There are a few things bugging me:
  • (Life of LS_Sphere1[LS_Loop]) Less than or equal to 0.00
I am not sure that this is a good way to do it. A war3 unit dies when it's HP drops bellow 0.435 (?), 0.4something, I do not remember exact number... Thus said, I doubt this to be the problem.

  • Set LS_TrigUnit[LS_MaxIndex] = No unit
I do remember that there was some weird stuff with some variable-type, which after being nulled in GUI could not be set in GUI again... but I doubt it was "Unit"...

Hmm, I have to ask, although you were very explicit in your post, does it bug with 2 instances or only when you spam it hard ?
 
Last edited:
Level 18
Joined
May 11, 2012
Messages
2,103
You are not lazy enough...
You can use a simple loop to create all 5 spheres and then modify them in the looping trigger. Another advantage is that hard coding values is a pain in the ass if you want to change them later, smaller code makes it a lot easier. With all these repeated actions it is very easy to do a mistake, like use LS_Angle2 instead of LS_Angle3.
  • -------- ------------------------------------------------------------------------------------- --------
  • 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])
>>>>>>>

  • Set NumSpheres = 5 {Or you can even make it scale with spell level or something, meh...}
  • For each (Integer Temp_Loop) from 1 to NumSpheres do (Actions)
    • Loop - Actions
      • Set LS_Angle[Temp_Loop][LS_MaxIndex] = 360/NumSpheres*Temp_Loop
      • Set LS_Point[2] = (LS_Point[1] offset by 150.00 towards LS_Angle[Temp_Loop][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_Sphere[Temp_Loop][LS_MaxIndex] = (Last created unit)
      • Unit - Add a LS_Duration[LS_SpellLvl[LS_MaxIndex]] second Generic expiration timer to LS_Sphere[TempLoop][LS_MaxIndex]
      • Custom script: call RemoveLocation(udg_LS_Point[2])
Now to the real question. On first glance everything looks fine. There are a few things bugging me:
  • (Life of LS_Sphere1[LS_Loop]) Less than or equal to 0.00
I am not sure that this is a good way to do it. A war3 unit dies when it's HP drops bellow 0.435 (?), 0.4something, I do not remember exact number... Thus said, I doubt this to be the problem.

  • Set LS_TrigUnit[LS_MaxIndex] = No unit
I do remember that there was some weird stuff with some variable-type, which after being nulled in GUI could not be set in GUI again... but I doubt it was "Unit"...

Hmm, I have to ask, although you were very explicit in your post, does it bug with 2 instances or only when you spam it hard ?

First trigger is fine.

You see, I missed that check :O
I'll set it to 0.41 (That's how it's in ym triggers).

Umm, should I just remove that?

And I'm not completely sure when it lags. It has its glorious moments to bug. As I said, sometimes it bugs out when heavy operation are active in WC3, when I spam it HARDLY..
It's completely fine when 2 instances are active. Nah, even when there are 10 instances.

OMG I just realized I posted this in the wrong forum...
Few months of WE absence and already I forgot lotta things.

Can someone move this to the appropriate forum (T&S)?
 
Status
Not open for further replies.
Top