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

Why does this spell lag?

Status
Not open for further replies.
Level 6
Joined
Dec 27, 2006
Messages
100
  • Angelic Guard
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Angelic Guard |cffDAA520(W)|r
    • Actions
      • Set AGAbility = (Level of Angelic Guard |cffDAA520(W)|r for (Triggering unit))
      • Set AGCaster = (Triggering unit)
      • Set AGDamagePosition = (Position of AGCaster)
      • Set AGDamage = (((Level of Angelic Guard |cffDAA520(W)|r for AGCaster) x 40) + 40)
      • Set TemporaryReal2 = 0.00
      • For each (Integer Loop) from 1 to 5, do (Actions)
        • Loop - Actions
          • Set TemporaryReal2 = (TemporaryReal2 + 72.00)
          • Set AGDamagePosition = ((Position of AGCaster) offset by 200.00 towards TemporaryReal2 degrees)
          • Special Effect - Create a special effect at AGDamagePosition using Abilities\Spells\Orc\AncestralSpirit\AncestralSpiritCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set AGDamagePositionGroup = (Units within 75.00 of AGDamagePosition matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of AGCaster)) Equal to True)))
          • Unit Group - Pick every unit in AGDamagePositionGroup and do (Actions)
            • Loop - Actions
              • Unit - Cause AGCaster to damage (Picked unit), dealing (Real(AGDamage)) damage of attack type Spells and damage type Divine
      • Custom script: call RemoveLocation(udg_AGDamagePosition)
      • Custom script: call DestroyGroup (udg_AGDamagePositionGroup)
Thanks in advance!
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • Angelic Guard
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Angelic Guard |cffDAA520(W)|r
    • Actions
      • Set AGCaster = (Triggering unit)
      • Set AGAbility = (Level of Angelic Guard |cffDAA520(W)|r for (AGCaster))
      • Set AGDamagePosition = (Position of AGCaster)
      • Set AGDamage = (((Level of Angelic Guard |cffDAA520(W)|r for AGCaster) x 40) + 40)
      • Set TemporaryReal2 = 0.00
      • For each (Integer Loop) from 1 to 5, do (Actions)
        • Loop - Actions
          • Set TemporaryReal2 = (TemporaryReal2 + 72.00)
          • Set AGDamagePosition_2 = ((AGDamagePosition) offset by 200.00 towards TemporaryReal2 degrees)
          • Special Effect - Create a special effect at AGDamagePosition_2 using Abilities\Spells\Orc\AncestralSpirit\AncestralSpiritCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set AGDamagePositionGroup = (Units within 75.00 of AGDamagePosition_2 matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of AGCaster)) Equal to True)))
          • Unit Group - Pick every unit in AGDamagePositionGroup and do (Actions)
            • Loop - Actions
              • Unit - Cause AGCaster to damage (Picked unit), dealing (Real(AGDamage)) damage of attack type Spells and damage type Divine
          • Custom script: call RemoveLocation(udg_AGDamagePosition_2)
          • Custom script: call DestroyGroup (udg_AGDamagePositionGroup)
      • Custom script: call RemoveLocation(udg_AGDamagePosition)
Thanks in advance!

Maybe because you had leaks. I fixed them. Also notice the change on the first two lines.
 
Status
Not open for further replies.
Top