| 08-01-2003, 02:52 AM | #1 |
Could someone please explain what an array is? And how its used? Possibly an example. Ive been making a custom aos map for 2 weeks, and I have a feeling I could be using arrays..... somehow... -Val |
| 08-01-2003, 03:00 AM | #2 |
| 08-01-2003, 03:03 AM | #3 |
actually, now that i look at that tutorial, it doesnt seem like it will help at all. |
| 08-01-2003, 03:25 AM | #4 |
Yes. An array is like many variables condensed into one. It's great for organizational purposes. And other things. When you define a variable, if you set it as an array, you then set how many values it will have. You can set variables in the array by using the standard Set Variable function. When it refers to an array, it gives you the option to change the array number (the number defines which position in the array an item is). An array is useful if you, for example, want to set a certain type of unit for each player. You can say "Set unitArray[(Number of (Picked Player))]=Unit name" The white part is the unit array. You set it to record a type of unit in a position corresponding to the number of a player. I guess that's sort of confusing, and arrays themselves are actually really simple. If you didn't follow it totally here, I recommend you set some array variables and just toy around with setting them and reading from them. |
