master of fugue
No, dead units can also have indexes.Well, I think you'll need over 8000 living units on the map for that to happen.
PUI does not create any handles it uses constant amount of memory at all times.Hm, basicly I use the GetUnitIndex() on any unit that comes in range of 2000 of one of 8 player controlled heroes (required for the aggro system i use).
I know that when a unit dies, the index gets recycled ... however; I have a trigger that removes the unit from the aggro system when the unit leaves a certain distance to all player heroes (to "clean" the system up and avoid having too much units on the aggro system). This trigger would be perfect to also remove the unit index, since the index is only used for the aggro system at my map.
I didn't check the code of PUI completely (because I trust you coding skills ). Is it a problem if there are hundrets of units indexed? I mean; are there loopcalls, handle creations, etc. that will increase the memory usage or processing power usage? My RPG has an enormous size (480x480) and thus also has a lot of creeps. I just don't want to use up all the 8190 handle slots so fast with loads of units indexed.
I really doubt you can break 8190 unit limit but please do try.
(Put say 7000 units on the map and see what happens )
PS: I strongly advise you do NOT manually remove unit indexes because sooner or later you will want to use PUI for something else than aggro and than it will be a problem.