• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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
 
Level 6
Joined
Sep 4, 2007
Messages
157
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.
Top