From 267d92eb2015f605ccc7c14fea8fe40b8d0f65b9 Mon Sep 17 00:00:00 2001 From: SilicaAndPina Date: Thu, 23 Jul 2020 11:07:08 +1200 Subject: [PATCH] CommitLog | --- scripts/generate_world.gml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/generate_world.gml b/scripts/generate_world.gml index 0878c3f..68f0a47 100644 --- a/scripts/generate_world.gml +++ b/scripts/generate_world.gml @@ -1,13 +1,15 @@ ///Generate World Chunks -show_debug_message(obj_controller_world_gen.generated_count); -var xmax = obj_player.x - view_wview[0]/2; -var ymax = obj_player.y - view_hview[0]/2; +var xmax = view_xview[0] + view_wview[0]; +var ymax = view_yview[0] - view_hview[0]; -for(var xx = 0; xx < view_xview[0]+view_wview[0];xx+=32) +show_debug_message(xmax); +show_debug_message(ymax); + +for(var xx = view_xview[0]; xx < xmax;xx+=32) { - for(var yy = 0; yy < view_yview[0]+view_hview[0];yy+=32) + for(var yy = view_yview[0]; yy < ymax;yy+=32) { var expe = string(xx)+string(yy) for(var i = 0; i <= obj_controller_world_gen.generated_count; i++) {