• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Recycle Dummy Units

Status
Not open for further replies.
Level 14
Joined
Nov 18, 2007
Messages
1,084
I would like to know how to recycle dummy units for my spell, Whirlwind. Specifically, it's to recycle a unit with an ability similar to Slow Aura. The unit itself doesn't do anything except sit there.
I tried looking at the xe system to see how it did it recycled its units; it didn't really help me.

I'm thinking of using a group for this, but I'm not sure if that's the right approach to this.

Sorry if this has been answered before as the Search function didn't turn up anything for me.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
That is unefficent as it could mean a temporary high places units which never get recycled just cause there is a potential to be recycled.

If the units do nothing but sit there, consider making them into generic dummies and adding the slow aura via trigger for the spell (removing it afterwards). You then have a global dummy stack that you can reuse for multiple spells as needed. You use a stack system simlar to those group and timer recycling does which basically stores them in an array and takes the top one from it every time you need one and put it at the top every time you give it back. You can then also estimate how many dumy units you need (1 per spell casting player is a good guess) then pre generate them into it. Ultimatly though if the stack is empty you will need to make one so keep that in mind.

So whats different between this and TriggerHappy's idea? Well the system is prety simlar but the idea is to make its scope not just unique to your spell, as it would be more efficent if multiple spells used it as their dummy not just that one.
 
Status
Not open for further replies.
Top