Variable initial values

Status
Not open for further replies.
No unofortunately, I think the reason for this is that if arrays end up having multiple dimensions for you to set the initial value of each would cause major lag in the editor, because it would be displaying all possible initial values of each array in the variable, and considering it can go up to 4 dimensions. Short answer is no, it can be done for non-array variables by just setting the initial value in the variable itself, but for arrays it would require displaying all initial values for each array dimension.
 
If your arrays have predictable initial values that follow an arithmetic formula, u can just loop it in a really big loop, otherwise yeah, only choice is a really big action definition in your Initializtion, or just all of them set in your initilization.
 
no I am doing a baneling bowling map so each of the 20 "pin" locations (2 lanes) have point variables in a 2d array like

Pin[1,2][1,2...9,10]

And I am doing a lot of text variables for messages and dialogs and stuff, so if I decide to change them I just have to edit variables instead of all the triggers using the text (is this what a stringtable is?)
 
I do not think they programed in an array initializer.

In java (and probably other C like languages) you can go...
int[] arrayvar = {0,1,2,3,4,5,6,7,8,9}
To initialize an array of a certain size with values. I do not think SC2 galaxy scrript supports that because of how arrays are not objects and must have a defined size of type although it should not make a difference (it would just need a smarter compiler to read the number of entries on the line).

Thus you will probably need to initialize all values after or during map init. The good news is that you can initialize them any time before they are needed. As such you should probably initialize them during various graphical effects (small numbers at a time) or just before they are needed (if there are few values needing to be initialized).
 
Status
Not open for further replies.
Back
Top