eastern-flames/eastern flames/scripts/array_generate_2d/array_generate_2d.gml

24 lines
406 B
Plaintext
Raw Permalink Normal View History

2022-08-07 21:14:04 +00:00
/*function array_create_depth(size, depth, value=0) {
var i;
var deepness = 0;
var array = [];
var arrayref = array;
for (i=0; i<depth; i++) {
for (j=0; j<size; j++) {
arrayref[j] = []
}
arrayref
}
array
return array;
}*/
function array_generate_2d(length, depth, value) {
var i;
var array = [];
for (i=0; i<length; i++) {
array[i] = array_create(depth, value);
}
return array;
}