Real quick, when I say "data array" I mean an array located in the Data Editor. So far I've figured out using Category Field Value Get, I can get access to a single value, such as InfoArray[0].Unit from the SCV's TerranBuild ability. However, I want to iterate over all members of the array, that is InfoArray[i].Unit. This brings me to 2 questions:
1) Is there a way to determine, a priori, the length of a data array (so I could loop it without hard-coding its length and worrying about if it changes later)?
2) Even with the loop and a hard-coded maximum length value, I'm a bit puzzled as to how to get the "i" in InfoArray[i].Unit, as it's just a string parameter. Edit: Realized I could just use StringCombine and pass in "i" that way [duh].
Sorry if this has been answered before - if so, then my searching ability is must be subpar.
Can you elaborate on the Catalog Field Value Get thing? You can get data from the data editor using this? I thought the data in the data editor was mostly off limits to triggers.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Real quick, when I say "data array" I mean an array located in the Data Editor. So far I've figured out using Category Field Value Get, I can get access to a single value, such as InfoArray[0].Unit from the SCV's TerranBuild ability. However, I want to iterate over all members of the array, that is InfoArray[i].Unit. This brings me to 2 questions:
1) Is there a way to determine, a priori, the length of a data array (so I could loop it without hard-coding its length and worrying about if it changes later)?
2) Even with the loop and a hard-coded maximum length value, I'm a bit puzzled as to how to get the "i" in InfoArray[i].Unit, as it's just a string parameter. Edit: Realized I could just use StringCombine and pass in "i" that way [duh].
Sorry if this has been answered before - if so, then my searching ability is must be subpar.
-SiNiquity
Can you elaborate on the Catalog Field Value Get thing? You can get data from the data editor using this? I thought the data in the data editor was mostly off limits to triggers.