Paradox and edwardr
One of the problems is when initializing values to an array..because you can't comment inside the Action area. The code looks very confusing, you forget what is what. So I think I came up with a solution that works for me.
if I had 4 columns of a "Gun" array: gunID, damage, speed, firerate
and if I wanted to initialize my array with 4 guns, my code would look like this:
GunArray Set value at (0,0) to 1
GunArray Set value at (0,1) to 10
GunArray Set value at (0,2) to 400
GunArray Set value at (0,3) to 1
GunArray Set value at (1,0) to 2
GunArray Set value at (1,1) to 5
GunArray Set value at (1,2) to 400
GunArray Set value at (1,3) to 1
GunArray Set value at (2,0) to 3
GunArray Set value at (2,1) to 40
GunArray Set value at (2,2) to 300
GunArray Set value at (2,3) to 3
GunArray Set value at (3,0) to 4
GunArray Set value at (3,1) to 100
GunArray Set value at (3,2) to 200
GunArray Set value at (3,3) to 10
^^ this is bad to look at because it makes no sense unless you remember which columns are which.
So I figured to make constant (read-only) variables.. like #defines in c/c++ and I make them all caps as well.
Global constant number GUN_ID = 0
Global constant number DAMAGE = 1
Global constant number SPEED = 2
Global constant number FIRE_RATE = 3
so it reads:
GunArray Set value at (0,GUN_ID) to 1
GunArray Set value at (0,DAMAGE) to 10
GunArray Set value at (0,SPEED) to 400
GunArray Set value at (0,FIRE_RATE) to 1
GunArray Set value at (1,GUN_ID) to 2
GunArray Set value at (1,DAMAGE) to 5
GunArray Set value at (1,SPEED) to 400
GunArray Set value at (1,FIRE_RATE) to 1
GunArray Set value at (2,GUN_ID) to 3
GunArray Set value at (2,DAMAGE) to 40
GunArray Set value at (2,SPEED) to 300
GunArray Set value at (2,FIRE_RATE) to 3
GunArray Set value at (3,GUN_ID) to 4
GunArray Set value at (3,DAMAGE) to 100
GunArray Set value at (3,SPEED) to 200
GunArray Set value at (3,FIRE_RATE) to 10
ahhhhh I feel better..