I'm using runtime 2.2.0.258 I tried changing "var i = 0" but I think I'm doing it wrong because I'm getting an "unexpected syntax error"
this is how it looked before I changed it:
// create another array that has the correct entries
var len = array_length_1d(global.__objectDepths);
global.__objectID2Depth = [];
for( var i=0; i<len; ++i ) {
var objID = asset_get_index( global.__objectNames[i] );
if (objID >= 0) {
global.__objectID2Depth[ objID ] = global.__objectDepths[i];
} // end if
} // end for
and this is after trying to do what you suggested:
// create another array that has the correct entries
var len = array_length_1d(global.__objectDepths);
global.__objectID2Depth = [];
for var i( i=0; i<len; ++i ) {
var objID = asset_get_index( global.__objectNames[i] );
if (objID >= 0) {
global.__objectID2Depth[ objID ] = global.__objectDepths[i];
} // end if
} // end for
sorry for being a pain, new to GMS2 really appreciate you trying to help.