Hoooowever a user once has found out that there seems to be a way of getting an id:
UnitGetPropertyInt(lv_tU,24,c_unitPropCurrent);
The 24th unit property doesn't exist, but it returns a number that seems to be unique for every unit (if one unit dies it's number will be recycled). However it returns multiples of 64, so: 0, 64, 128, 194, 256, etc.
It doesn't really work the other way round tho. But with an array that's no problem anymore.
PS: That should also work through GUI by using Get Unit Property (Int) and when you choose the property you select Value and enter 24 (or actually any number above that).
there is a function to get a unit trought a id (UnitFromId) but how can i get the id of a unit? i found no function or native.
plz help :)
You haven't found none because there is none.
Hoooowever a user once has found out that there seems to be a way of getting an id:
The 24th unit property doesn't exist, but it returns a number that seems to be unique for every unit (if one unit dies it's number will be recycled). However it returns multiples of 64, so: 0, 64, 128, 194, 256, etc.
It doesn't really work the other way round tho. But with an array that's no problem anymore.
PS: That should also work through GUI by using Get Unit Property (Int) and when you choose the property you select Value and enter 24 (or actually any number above that).
hmm thanks for the reply but if there is no such thing i'll use my normal index. it's saver and doesn't change if i don't want
@HellGateSc2: Go
What are you actually trying to do with the "ID"
You should be able to use "unit type" and Unit variables to accomplish most things.
@SouLCarveRR: Go
making a addon for data tables (to make it like hashtables)