• 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.

[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
 
Level 3
Joined
Jul 12, 2005
Messages
48
This Simply Destroys the effect as soon as its done.
JASS:
call DestroyEffect(AddSpecialEffectTarget("SpecialEffectName.mdl", GetEnumUnit(), "Origin"))
 
Level 12
Joined
Apr 29, 2005
Messages
999
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.
Top