I'm trying to implement multi-dimensional arrays in Scratch, for an implementation of maze generation.
To simplify, I'd like to implement a couple of custom blocks which return a value, e.g. get2dValue( x, y ). I see hints in the forum this might be possible, but I cannot find it documented in the wiki.
// Use Scratch's list variable as a 2d array, 30 elements maximum
get2dValue( X, Y )
{
return item( ( ( Y - 1 ) * 30 ) + X ) of maze
}