From 8496773e69e72755d470f3983ad115c57d3c9beb Mon Sep 17 00:00:00 2001 From: Patrick_Pluto Date: Sun, 16 Jun 2024 00:01:13 +0200 Subject: [PATCH] Minor Fixes --- export_presets.cfg | 2 +- scripts/mapscript.gd | 1 - scripts/player.gd | 4 +++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/export_presets.cfg b/export_presets.cfg index bbf2fda..4bb2d07 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -8,7 +8,7 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="../Desktop/debug" +export_path="../Desktop/debug.exe" encryption_include_filters="" encryption_exclude_filters="" encrypt_pck=false diff --git a/scripts/mapscript.gd b/scripts/mapscript.gd index d992751..e937b2d 100644 --- a/scripts/mapscript.gd +++ b/scripts/mapscript.gd @@ -13,6 +13,5 @@ func next(): objectName= "player%d" % playerIndex print(objectName) get_node(objectName).start() - get_node(objectName).loadJSON(playerIndex) playerIndex += 1 diff --git a/scripts/player.gd b/scripts/player.gd index fb073d5..2dcbf10 100644 --- a/scripts/player.gd +++ b/scripts/player.gd @@ -11,14 +11,16 @@ func get_input(): velocity = input_direction * speed func _physics_process(delta): + var toCalculate = position if active: get_input() move_and_slide() - var toCalculate = position distanceTo += position.distance_to(toCalculate) + print(distanceTo) if distanceTo > 500 and active: active = false $camera.enabled = false + distanceTo = 0 get_parent().next()