• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[JASS] Destroy Effects

Status
Not open for further replies.
Level 10
Joined
Jul 14, 2004
Messages
463
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
 
This Simply Destroys the effect as soon as its done.
JASS:
call DestroyEffect(AddSpecialEffectTarget("SpecialEffectName.mdl", GetEnumUnit(), "Origin"))
 
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.
 
Status
Not open for further replies.
Back
Top