Thread: AutoIndex
View Single Post
Old 04-25-2009, 08:04 PM   #15
requires vJass
grim001's Avatar

Code Moderator
Join Date: Nov 2006
Posts: 1,540

Submissions (10)

grim001 is just really nice (277)grim001 is just really nice (277)

Send a message via AIM to grim001

Originally Posted by Captain Griffen
I think you should have a GetUnitId function.

Originally Posted by Vexorian
You can make an AutoIndex that uses handle table
Pretty good idea, handle table would not have been possible if you are relying on the UnitUserData becomes 0 trick for removal detection, but with this, any storage method is possible.

So I'll make it as soon as you make Table initialize its gamecache in a struct init, otherwise it would fail on every unit entering the map or created from a a unitEntersMap method.

Originally Posted by Mr.Malte
I think it could make some maps really slower.
In my map for example, I've got a spell which creates 45 units per second.
Seriously, creasing 45 units per second will lag your map. If you need to do something like that, you should recycle those units. Indexing an entering unit is like 0.001% of the cost of actually creating a unit.
grim001 is offline   Reply With Quote