HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Unique Custom Value integer "index" for each unit.

01-12-2006, 01:59 AM#1
AnarkiNet
I'd like to run my idea by some of the trigger/JASS experts:

I'd set the custom value of every new unit to an Index value, which could then be used as the array key for various arrays, or perhaps for gamecache row indices or something. The map is my TD, PolyMD, and i'm not sure if this would end up eating a huge amount of memory as the total number of units spawned might reach in the tens of thousands...perhaps even hundreds of thousands.

So, is this going to work?
01-12-2006, 02:04 AM#2
Vexorian
Quote:
or perhaps for gamecache row indices or something.
many guys use H2I for that kind of things.

If you use gamecache and H2I you can clean the used gamecache 'mission' once the unit dies
01-12-2006, 10:30 AM#3
johnfn
Hundreds of thousands seems a little harsh for the WC3 engine... gamecache seems the way to go..

Although you might have trouble rearranging a 100K length array if the first unit in the array dies and the rest have to all move down. Maybe you shouldn't even bother. :P
01-12-2006, 10:39 AM#4
iNfraNe
Well, thats why he should use gamecache with H2I. That way there is no need to have a real "array", its object orientated.