Three very simple scripts for the creation of 3D arrays to use in your projects.
These scripts work by converting X, Y, and Z coordinates into a 1 dimensional array using a simple formula. Using the same formula, specific values can be retrieved and set within the array. Note: as these are using built-in arrays instead of data structures, you will need to know the max length of the X, Y, and Z coordinates in order to use these scripts.
The scripts are: array3D_create( initial value, x max, y max, z max) array3D_get( array name, x, y, z, x max, y max, z max) array3D_set( array name, value, x, y, z, x max, y max, z max)
I found this to be a very simple, yet very powerful set of scripts that I constantly use within my own projects. Enjoy!