Warcraft III resources & community, 2003–2006 · archived

Destroy Effects

4 posts
#1

Destroy Effects

If I create special effects and don't manually destroy them, they will cause lag, even if they show only a short time like e.g. an explosion, am I right?

If this is the case, please help me with the following problem:
I have a spell and want to make it a little bloodier so I created a Blood effect on every of the target units. It's an AoE spell so there may be many units involved, but I don't know how many. I have a "Pick every unit in group and do..." loop and as actions I create the effects.
Is there any way to destroy them a second later without using global variables?

Thanks for help,
Waldbär JASS n00b
#2
This Simply Destroys the effect as soon as its done.
call DestroyEffect(AddSpecialEffectTarget("SpecialEffectName.mdl", GetEnumUnit(), "Origin"))
#3
This will destroy the effect as soon as it is created. It dosn't work well with all effects. It has something to do with the animations. I don't remember excactly. Otherwise if you want an effect to last some time, use Nantuko's Timed Effect script. I's really usefull.
#4
Thanks for both tips! :)
In my case, the first possibility works fine, but I'll keep the second one in mind for future spells. :wink: