- Joined
- Oct 11, 2012
- Messages
- 711
Hey guys, I am wondering the necessity of using a Unit Indexer system, we do have
GetHandleId(unit)
, right? What's the difference?GetHandleId(unit)
, right? What's the difference?You mean in unit indexers? Well, because you can't use the handle ids directly as array indices, that's why.
call SaveReal(hash,GetHandleId(unit),0,0)
GetHandleId
returns handleid of given handle. It is also unique, but for agents(unit is agent) the returned value starts at 0x100000(roughly 1.4 million). You cant use 1,400,000 inside array Thanks for asking this question Geshishouhu, it helped me a lot in understanding the purpose behind a UnitIndexer, and I was thinking of creating a similar thread too.
So the gist is that unit indexer gives a performance boost to code that requires MUI, if I understand correctly.