Clearing special Effects

Status
Not open for further replies.
Level 10
Joined
Apr 13, 2005
Messages
630
Ive never fully understood leaks of removing or destroying stuff but i got a problem with removing special effect here my problem

Heres wut i put
  • Wrath
  • Special Effect - Create a special effect at ((Position of (Casting unit)) offset by (0.00, -500.00)) using Abilities\Spells\Human\FlameStrike\FlameStrikeEmbers.mdl
  • Set SpecialEffects[10] = (Last created special effect)
  • Special Effect - Destroy SpecialEffects[10]
  • Custom script: call DestroyGroup(udg_SpecialEffects[10])


This is my leak checker telling me its all good and removed but when i tested game warcraft came up with the error crap saying "Invalided Argument Type (effect)

so i redid the trigger as

  • Wrath
  • Special Effect - Create a special effect at ((Position of (Casting unit)) offset by (0.00, -500.00)) using Abilities\Spells\Human\FlameStrike\FlameStrikeEmbers.mdl
  • Set SpecialEffects[10] = (Last created special effect)
  • Special Effect - Destroy SpecialEffects[10]
  • Custom script: call DestroyEffect(udg_SpecialEffects[10])
I just want to know if i removed it or not
 
well the way you did your second way your destroying the effect 2 times and i dont think destroy special effect leaks and your using a global variable so no need to null them cuz they dont leak once you add something else to the variable the old data is removed
 
Status
Not open for further replies.
Back
Top