About Custom Value Indexing System

merlinds

Member
Reaction score
15
I have a question, does the custom value of a unit have a maximum value? like a variable that haves 8xxx as maximum value.
 

Ayanami

칼리
Reaction score
288
I'm pretty sure it can go up pretty high. Not really sure of the exact value though.
 

merlinds

Member
Reaction score
15
Because my idea is the next:
Every time a unit enters the map i set its custom value to a number, and every time i do this i increase that number by 1 (with an integer variable).
So, every unit will have a index as its custom value that i can use later for diferent skills.
The problem is, that the map is a hero defense, so there will be a lot of units, and when they die more will come, and im afraid that the custom value can reach is maximum value.
And i do not know if i can reset the counter because some units (like the heroes for example) will remain the entire game.
 

Ayanami

칼리
Reaction score
288
Even though you have loads of units, I don't think it will surpass a few thousands. Custom value can go up to that magnitude. Oh and seems like you're trying to create an indexing system. Would be easier by vJASS actually :/
 

Laiev

Hey Listen!!
Reaction score
188
If you use NewGen, you can use one of Index system already made and then, just use Custom Value of Unit inside the array :p

I suggest AIDS or UnitIndexer.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
i guess the custom value is an integer, in which case it got 2^32 possible values, split into two halfs one of which is positive and one negative.
For all the lazy people around its about: 4 294 967 296 different values.

Might be wrong though if the custom value is not an integer but i dont think so.
 

Laiev

Hey Listen!!
Reaction score
188
Keep in mind that if you'll use it for array, you should stay in the limit of array.
 

Dirac

22710180
Reaction score
147
There are already plenty GUI and vJass unit indexing systems out there, save you some work and get one of them.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top