spr_chunk 0 0 0 0 <undefined> <undefined> 1 603 7 0 0 -1 2 self 0 0 1 /// GENERATE CHUNK instance_list = ds_list_create(); loaded = true; var hasGeneratedBlackHole = false; // GENERATION for(var xx = 0; xx < CHUNK_SIZE*TILE_SIZE; xx+= TILE_SIZE) { for(var yy = 0; yy < CHUNK_SIZE*TILE_SIZE; yy+= TILE_SIZE) { var rnd = random_range(0,5000); if(floor(rnd) == 1000) { if(hasGeneratedBlackHole) continue; var inst = instance_create(x+xx,y+yy, obj_black_hole); inst.CHUNK_CONTAINED = self.id; ds_list_add(instance_list, inst); hasGeneratedBlackHole = true; continue; } if(rnd % 100 < 1) { var inst = instance_create(x+xx,y+yy, obj_asteriod); inst.CHUNK_CONTAINED = self.id; ds_list_add(instance_list, inst); continue; } } } 1 603 7 0 0 -1 2 self 0 0 1 var chunk_total_size = CHUNK_SIZE * TILE_SIZE visible = global.debug if(distance_to_object(obj_player) > chunk_total_size*3) { event_user(0); } 1 603 7 0 0 -1 2 self 0 0 1 /// load for(var i = 0; i < ds_list_size(instance_list); i++) { instance_activate_object(instance_list[| i]); } loaded = true; 1 603 7 0 0 -1 2 self 0 0 1 /// unload for(var i = 0; i < ds_list_size(instance_list); i++) { instance_deactivate_object(instance_list[| i]); } loaded = false; instance_deactivate_object(id); 0 0 0 0.5 0.100000001490116 0 0.100000001490116 0.100000001490116 0.200000002980232 -1 0