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

[Trigger] Best way to avoid leaking created units from spells.

Status
Not open for further replies.
Level 3
Joined
Jul 29, 2008
Messages
30
Not really a spell persey, but under certain conditions when a unit is attacked I spawn a sorceress to cast silence.

Problem is I have multiple units attacking very fast so I'm guessing the cause of my slowdown is excess spawned sorceress's that aren't being destroyed.

My first defense against this is adding an expiration timer to the hidden units.

Anymore suggestions to avoid this?
 
Level 7
Joined
Jul 20, 2008
Messages
377
Expiration timer is your answer. However, I'm not sure if expiration timer only kills units without removing them from the game. Therefore, you may want another trigger for when an unit dies, and if it's of the dummy types, remove them.
 
Status
Not open for further replies.
Top