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

Quick Question about Destroying Special Effects

Status
Not open for further replies.

Sverkerman

Hosted Project: BoW
Level 17
Joined
Feb 28, 2010
Messages
1,325
Hello and thank you for reading my thread.

If I make a special effect on a unit and then kill the unit after 1 second, when the unit is dead does the special effects get destroyed correctly or do they leak?

Thank you!

+4 rep to all helpers!
 
Level 13
Joined
May 10, 2009
Messages
868
You still have to destroy it.

EDIT:

Here's a test map. Press ESC in order to start a timer, which creates a unit and effect every 0.01. By default, the effects are not being destroyed, so pay attention to the leaderboard number going up drastically - that's the effect handle id. Then, uncomment the following line in the "Looping" trigger: //call DestroyEffect(sfx)
Now you'll see that the "Last Effect ID" on the board does not increase constantly.


For this test, the units last 1 second, and it takes another one in order to remove them completely (raise + decay).
 

Attachments

  • test.w3x
    22.8 KB · Views: 38
Last edited:
Status
Not open for further replies.
Top