• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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