<undefined>
0
-1
0
0
<undefined>
<undefined>
1
603
7
0
0
-1
2
self
0
0
1
global.allchunks = ds_list_create();
1
603
7
0
0
-1
2
self
0
0
1
/// GameMaker Is Stupid
for(var i = 0; i < 16; i ++)
{
var chunkat = instance_position(cX[i], cY[i],obj_chunk);
if(chunkat == noone) // create
{
show_debug_message("Generating Chunk: "+string(cX[i])+","+string(cY[i]));
var chunkInstId = instance_create(cX[i],cY[i],obj_chunk);
ds_list_add(global.allchunks,chunkInstId);
}
else // load
{
if(chunkat.loaded = false)
{
show_debug_message("Loading Chunk: "+string(cX[i])+","+string(cY[i]));
with(chunkat){
event_user(1);
}
}
}
}
1
603
7
0
0
-1
2
self
0
0
1
/// Load Chunks
var chunk_total_size = (CHUNK_SIZE*TILE_SIZE);
var chunkCoords = get_chunk_coords(obj_player.x,obj_player.y);
var chunkX = chunkCoords[0];
var chunkY = chunkCoords[1];
chunkX -= chunk_total_size;
chunkY -= chunk_total_size;
// Load Chunks
cX[16] = 0;
cY[16] = 0;
var i = 0;
for(var xx = 0; xx < 4; xx++)
{
for(var yy = 0; yy < 4; yy++)
{
instance_activate_region(chunkX+(chunk_total_size*xx),chunkY+(chunk_total_size*yy),1,1,true);
cX[i] = chunkX+(chunk_total_size*xx)
cY[i] = chunkY+(chunk_total_size*yy)
i++;
}
}
0
0
0
0.5
0.100000001490116
0
0.100000001490116
0.100000001490116
0.200000002980232
-1
0