Dustins Unit Indexing Library
Objective
This library indexes units so they can be referenced by Index Numbers auto generated and uniquely assigned to each unit in the system.
Functions
- To setup a unit into the system use the function: UI_Setup(Unit)
- To retrieve a units index use the function: UI_Get_Unit_Index(Unit)
- To retrieve the unit associated with an index number use: UI_Get_Index_Unit(Index)
Customization
- The system uses DataTables so you are not restricted to the array limit.
- By default the system enters every unit that enters the map into the system to change this modify the UI_Init trigger to whatever you need.
- This library has a DEBUG feature, to enable this modify the UI_ALLOW_DEBUG varaible and set it to true.
- Then when in the map type debug in the chat to display unit indexs above their head.
<<reply 1642049>
Correct, this function was added recently to SC2, my system here was made long before this function. So you can disregard this asset now unless you're wanting to see how one would make a system like this for something else or if you need more flexibility with the system.
Hi there,
I don't want to be picky, but there is a function called (Unit Tag) already.
Function is described as:
A unit's tag is a unique integer associated with that unit. The tag will never change and will never be associated with a different unit.
Isn't that the same what you did?