- Joined
- Nov 25, 2008
- Messages
- 1,309
Is there a method of obtaining perfect unit indexing? Perfect indexing is:
- Indexes each unit that is created with
CreateUnit()
. - Index every unit created training and buying units.
- Deindex a unit that is removed with
RemoveUnit[icode=jass].[*]Deindex a unit that is removed because it decayed (either the corpse decayed, or the unit had no corpse and dies).[*]This should handle units, heroes, and buildings as well as account for resurrection of said units, heroes, and buildings.[/list]The system probably can easily be extended to tell if a unit is dead or alive as well. I want this to be done automagically. That is; I won't want to monitor each time I use the aforementioned functions. I currently use a unit enters region event with a region covering the entire map, and a building starts construction to catch built buildings. However, getting deindexing to work properly I use the undefend order, but that doesn't work for buildings oddly enough.Any input is appreciated.