I just started looking into using these unit custom values for some AI work I'm doing and discovered (at least so far) that you can only set the values of these to reals and it won't accept negative ones. That true? I can't say set a particular custom index to refer to other data types such as units or even just integers instead of reals?
ED: ie so far it looks like the custom values is just an array of undetermined size of reals that are attached to each unit, looking to see if that's really the definition or if there is a way to adjust this structure in any way. Also if anyone knows of any limits on the size of this array that'd be handy too. I only intend to use maybe one or two indexes per unit but knowing I could if wanted use like say 100 such values per unit it would be pretty useful for general knowledge.
I'm certain that the reals can be negative - I'm using custom values in my map that are set to negative values on occasion by trigonometric functions. As for the size and data type, I have no idea. I doubt the data type is alterable though.
Hrm, yah I suspected as much about the data types but the negative numbers are odd as you see when I tried use a trigger to set one of these values negative it won't go below zero, at least if I'm setting its value 'manually' with the trigger editor rather then just giving it the value of some other variable/function result etc. Interesting to know...
I just started looking into using these unit custom values for some AI work I'm doing and discovered (at least so far) that you can only set the values of these to reals and it won't accept negative ones. That true? I can't say set a particular custom index to refer to other data types such as units or even just integers instead of reals?
ED: ie so far it looks like the custom values is just an array of undetermined size of reals that are attached to each unit, looking to see if that's really the definition or if there is a way to adjust this structure in any way. Also if anyone knows of any limits on the size of this array that'd be handy too. I only intend to use maybe one or two indexes per unit but knowing I could if wanted use like say 100 such values per unit it would be pretty useful for general knowledge.
I'm certain that the reals can be negative - I'm using custom values in my map that are set to negative values on occasion by trigonometric functions. As for the size and data type, I have no idea. I doubt the data type is alterable though.
@VulfeSC: Go
Hrm, yah I suspected as much about the data types but the negative numbers are odd as you see when I tried use a trigger to set one of these values negative it won't go below zero, at least if I'm setting its value 'manually' with the trigger editor rather then just giving it the value of some other variable/function result etc. Interesting to know...
Looks like it is a small bug. You just can't directly Unit - Set YourUnit custom value 0 to -1
I actually tested this:
Variable - Set X = -1.0
Unit - Set YourUnit custom value 0 to X
UI - Display (Text((Custom value 0 of YourUnit)) with Any Precision decimal places) for (All players) to Subtitle area
And it works and shows -1
You should report this bug to Blizzard.