In general if you have an array with sizes: sizeX, sizeY and sizeZ,
and X,Y and Z are the current positions,
then here is the general formula:
X+sizeX*(Y-1)+sizeX*sizeY*(Z-1)
or if written in construct:
@(Array.CurrentX + Array.SizeX*(Array.CurrentY - 1) + Array.SizeX*Array.SizeY*(Array.CurrentZ - 1))[/code:exdklix3]
and if it's just a 2d array:
[code:exdklix3]@(Array.CurrentX + Array.SizeX*(Array.CurrentY - 1))[/code:exdklix3]
The other formula I gave you fills the Y column before increasing X. It was in this form:
[i]Y+sizeY*(X-1)[/i]