• It's time to dig through Hive's model database and dust off some oldie but goldie models and enter Hive's Texturing Contest #31 : Repurposing! Click here to enter!
  • 🏆 Hive's 5th HD Modeling Contest: Creep Camp is now open! Click here to enter!

Variable Question: Array?

Level 7
Joined
Feb 6, 2008
Messages
133
What is array?
Is it something like this?
Instead of using lots of integer variables, i could just use array.
Example: I have 11 integer variables, 11 teleport region and 11 teleported region. so the variables is to store the random generated number for each teleport region.. but i don't have to use that much integer variables right? i could just use 1 integer variable, set array size to 10 then just index them as 0 to 10 and use this one variable for all the teleport regions.. is this correct? or is it safer to separate the variable?
 
Last edited:
Level 10
Joined
Mar 31, 2009
Messages
732
Yes, arrays are generally zero based. WE doesn't enforce size limits, so you don't get array index out of bounds errors, except negative indexes.

Most functions from Blizzard.j will use 1-based indexes though, which includes most of what you see in the GUI triggers.
 
Top