From 8ceb6e1027284ddcc71c7fbfe2704c8318d0457f Mon Sep 17 00:00:00 2001 From: Sage The DM Date: Thu, 17 Apr 2025 18:41:54 +0200 Subject: [PATCH] help me please lord --- .../.godot/editor/create_recent.Node | 2 +- the-scavanger/.godot/editor/editor_layout.cfg | 11 ++++---- ...state-a2d9d4e2619cfe9f508a7ce437bf36bc.cfg | 6 ++--- ...state-b73a784f178a47915fc66b3add4a1dff.cfg | 6 ++--- ...lding-b73a784f178a47915fc66b3add4a1dff.cfg | 2 +- .../.godot/editor/project_metadata.cfg | 2 +- .../.godot/editor/script_editor_cache.cfg | 14 ++++------ ...state-1d5fdaa6118f033b4cb4a73d58a8d8b8.cfg | 2 +- the-scavanger/project.godot | 6 +++++ the-scavanger/scenes/maps/map.tscn | 1 + the-scavanger/scenes/player-npc/player.tscn | 9 +++++++ the-scavanger/scripts/player.gd | 27 ++++++++++++------- 12 files changed, 54 insertions(+), 34 deletions(-) diff --git a/the-scavanger/.godot/editor/create_recent.Node b/the-scavanger/.godot/editor/create_recent.Node index 0d0fae1..7197c62 100644 --- a/the-scavanger/.godot/editor/create_recent.Node +++ b/the-scavanger/.godot/editor/create_recent.Node @@ -1,3 +1,4 @@ +TextEdit CollisionShape2D Area2D Node @@ -5,7 +6,6 @@ Sprite2D Node2D StaticBody2D RichTextLabel -TextEdit Timer AnimatedSprite2D Camera2D diff --git a/the-scavanger/.godot/editor/editor_layout.cfg b/the-scavanger/.godot/editor/editor_layout.cfg index 90c2a45..7e1240a 100644 --- a/the-scavanger/.godot/editor/editor_layout.cfg +++ b/the-scavanger/.godot/editor/editor_layout.cfg @@ -2,7 +2,7 @@ dock_3_selected_tab_idx=0 dock_4_selected_tab_idx=0 -dock_5_selected_tab_idx=1 +dock_5_selected_tab_idx=0 dock_floating={} dock_filesystem_h_split_offset=240 dock_filesystem_v_split_offset=0 @@ -29,10 +29,11 @@ dock_5="Inspector,Node,History" [EditorNode] open_scenes=PackedStringArray("res://scenes/maps/map.tscn", "res://scenes/player-npc/player.tscn", "res://scenes/enemies/slime.tscn") -current_scene="res://scenes/maps/map.tscn" +current_scene="res://scenes/player-npc/player.tscn" center_split_offset=-289 selected_default_debugger_tab_idx=0 -selected_main_editor_idx=0 +selected_main_editor_idx=2 +selected_bottom_panel_item=0 [EditorWindow] @@ -48,11 +49,11 @@ selected_script="res://scripts/player.gd" open_help=[] script_split_offset=200 list_split_offset=0 -zoom_factor=1.07143 +zoom_factor=0.928575 [GameView] -floating_window_rect=Rect2i(1920, 23, 1920, 1009) +floating_window_rect=Rect2i(2298, 151, 1164, 695) floating_window_screen=2 [ShaderEditor] diff --git a/the-scavanger/.godot/editor/map.tscn-editstate-a2d9d4e2619cfe9f508a7ce437bf36bc.cfg b/the-scavanger/.godot/editor/map.tscn-editstate-a2d9d4e2619cfe9f508a7ce437bf36bc.cfg index 507fb8e..8f6c460 100644 --- a/the-scavanger/.godot/editor/map.tscn-editstate-a2d9d4e2619cfe9f508a7ce437bf36bc.cfg +++ b/the-scavanger/.godot/editor/map.tscn-editstate-a2d9d4e2619cfe9f508a7ce437bf36bc.cfg @@ -8,7 +8,7 @@ Anim={ "grid_snap_active": false, "grid_step": Vector2(8, 8), "grid_visibility": 1, -"ofs": Vector2(-721.364, -472), +"ofs": Vector2(1999.81, -1932.01), "primary_grid_step": Vector2i(8, 8), "show_group_gizmos": true, "show_guides": true, @@ -34,7 +34,7 @@ Anim={ "snap_rotation_step": 0.261799, "snap_scale": false, "snap_scale_step": 0.1, -"zoom": 1.1 +"zoom": 0.289664 } 3D={ "fov": 70.01, @@ -192,4 +192,4 @@ Game={ "hide_selection": true, "select_mode": 1 } -selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@21272/@Panel@14/@VBoxContainer@15/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@26/DockVSplitCenter/@VSplitContainer@54/@VBoxContainer@55/@EditorMainScreen@102/MainScreen/@CanvasItemEditor@11482/@VSplitContainer@11134/@HSplitContainer@11136/@HSplitContainer@11138/@Control@11139/@SubViewportContainer@11140/@SubViewport@11141/Game/conversations/Area2D")]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@21272/@Panel@14/@VBoxContainer@15/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@26/DockVSplitCenter/@VSplitContainer@54/@VBoxContainer@55/@EditorMainScreen@102/MainScreen/@CanvasItemEditor@11482/@VSplitContainer@11134/@HSplitContainer@11136/@HSplitContainer@11138/@Control@11139/@SubViewportContainer@11140/@SubViewport@11141/Player/TextEdit")]) diff --git a/the-scavanger/.godot/editor/player.tscn-editstate-b73a784f178a47915fc66b3add4a1dff.cfg b/the-scavanger/.godot/editor/player.tscn-editstate-b73a784f178a47915fc66b3add4a1dff.cfg index 86cb619..fba6975 100644 --- a/the-scavanger/.godot/editor/player.tscn-editstate-b73a784f178a47915fc66b3add4a1dff.cfg +++ b/the-scavanger/.godot/editor/player.tscn-editstate-b73a784f178a47915fc66b3add4a1dff.cfg @@ -8,7 +8,7 @@ Anim={ "grid_snap_active": false, "grid_step": Vector2(8, 8), "grid_visibility": 1, -"ofs": Vector2(-96056.7, -43555.7), +"ofs": Vector2(-210.168, -100.509), "primary_grid_step": Vector2i(8, 8), "show_group_gizmos": true, "show_guides": true, @@ -34,7 +34,7 @@ Anim={ "snap_rotation_step": 0.261799, "snap_scale": false, "snap_scale_step": 0.1, -"zoom": 0.0078125 +"zoom": 2.85312 } 3D={ "fov": 70.01, @@ -192,4 +192,4 @@ Game={ "hide_selection": false, "select_mode": 0 } -selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@21272/@Panel@14/@VBoxContainer@15/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@26/DockVSplitCenter/@VSplitContainer@54/@VBoxContainer@55/@EditorMainScreen@102/MainScreen/@CanvasItemEditor@11482/@VSplitContainer@11134/@HSplitContainer@11136/@HSplitContainer@11138/@Control@11139/@SubViewportContainer@11140/@SubViewport@11141/Game/conversations/Area2D")]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@21272/@Panel@14/@VBoxContainer@15/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@26/DockVSplitCenter/@VSplitContainer@54/@VBoxContainer@55/@EditorMainScreen@102/MainScreen/@CanvasItemEditor@11482/@VSplitContainer@11134/@HSplitContainer@11136/@HSplitContainer@11138/@Control@11139/@SubViewportContainer@11140/@SubViewport@11141/Player/TextEdit")]) diff --git a/the-scavanger/.godot/editor/player.tscn-folding-b73a784f178a47915fc66b3add4a1dff.cfg b/the-scavanger/.godot/editor/player.tscn-folding-b73a784f178a47915fc66b3add4a1dff.cfg index aea02d4..045c857 100644 --- a/the-scavanger/.godot/editor/player.tscn-folding-b73a784f178a47915fc66b3add4a1dff.cfg +++ b/the-scavanger/.godot/editor/player.tscn-folding-b73a784f178a47915fc66b3add4a1dff.cfg @@ -1,5 +1,5 @@ [folding] -node_unfolds=[NodePath("."), PackedStringArray("Collision"), NodePath("healthbar"), PackedStringArray("Visibility"), NodePath("DodgeCoolDownBar"), PackedStringArray("Visibility")] +node_unfolds=[NodePath("."), PackedStringArray("Collision"), NodePath("healthbar"), PackedStringArray("Visibility"), NodePath("DodgeCoolDownBar"), PackedStringArray("Visibility"), NodePath("TextEdit"), PackedStringArray("Visibility")] resource_unfolds=["res://scenes/player-npc/player.tscn::SpriteFrames_tfyf1", PackedStringArray(), "res://scenes/player-npc/player.tscn::RectangleShape2D_oqexx", PackedStringArray(), "res://scenes/player-npc/player.tscn::CircleShape2D_fb3s1", PackedStringArray()] nodes_folded=[NodePath("player_hitbox")] diff --git a/the-scavanger/.godot/editor/project_metadata.cfg b/the-scavanger/.godot/editor/project_metadata.cfg index 2968871..c458db9 100644 --- a/the-scavanger/.godot/editor/project_metadata.cfg +++ b/the-scavanger/.godot/editor/project_metadata.cfg @@ -21,7 +21,7 @@ search_help=Rect2(2400, 270, 960, 540) [project_settings] -show_builtin_actions=false +show_builtin_actions=true [color_picker] diff --git a/the-scavanger/.godot/editor/script_editor_cache.cfg b/the-scavanger/.godot/editor/script_editor_cache.cfg index cf918d3..ee7e4ca 100644 --- a/the-scavanger/.godot/editor/script_editor_cache.cfg +++ b/the-scavanger/.godot/editor/script_editor_cache.cfg @@ -3,16 +3,12 @@ state={ "bookmarks": PackedInt32Array(), "breakpoints": PackedInt32Array(), -"column": 30, +"column": 28, "folded_lines": Array[int]([]), "h_scroll_position": 0, -"row": 379, -"scroll_position": 404.0, -"selection": true, -"selection_from_column": 2, -"selection_from_line": 379, -"selection_to_column": 30, -"selection_to_line": 379, +"row": 412, +"scroll_position": 397.0, +"selection": false, "syntax_highlighter": "GDScript" } @@ -25,7 +21,7 @@ state={ "folded_lines": Array[int]([]), "h_scroll_position": 0, "row": 94, -"scroll_position": 98.0, +"scroll_position": 94.0, "selection": false, "syntax_highlighter": "GDScript" } diff --git a/the-scavanger/.godot/editor/slime.tscn-editstate-1d5fdaa6118f033b4cb4a73d58a8d8b8.cfg b/the-scavanger/.godot/editor/slime.tscn-editstate-1d5fdaa6118f033b4cb4a73d58a8d8b8.cfg index cd4cd88..dd1453e 100644 --- a/the-scavanger/.godot/editor/slime.tscn-editstate-1d5fdaa6118f033b4cb4a73d58a8d8b8.cfg +++ b/the-scavanger/.godot/editor/slime.tscn-editstate-1d5fdaa6118f033b4cb4a73d58a8d8b8.cfg @@ -192,4 +192,4 @@ Game={ "hide_selection": false, "select_mode": 0 } -selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@21272/@Panel@14/@VBoxContainer@15/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@26/DockVSplitCenter/@VSplitContainer@54/@VBoxContainer@55/@EditorMainScreen@102/MainScreen/@CanvasItemEditor@11482/@VSplitContainer@11134/@HSplitContainer@11136/@HSplitContainer@11138/@Control@11139/@SubViewportContainer@11140/@SubViewport@11141/Game/conversations/Area2D")]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@21272/@Panel@14/@VBoxContainer@15/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@26/DockVSplitCenter/@VSplitContainer@54/@VBoxContainer@55/@EditorMainScreen@102/MainScreen/@CanvasItemEditor@11482/@VSplitContainer@11134/@HSplitContainer@11136/@HSplitContainer@11138/@Control@11139/@SubViewportContainer@11140/@SubViewport@11141/Player/TextEdit")]) diff --git a/the-scavanger/project.godot b/the-scavanger/project.godot index 6fe539c..0fa0b8f 100644 --- a/the-scavanger/project.godot +++ b/the-scavanger/project.godot @@ -21,6 +21,12 @@ global="*res://scripts/global.gd" [input] +ui_accept={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194309,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194310,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +] +} ui_left={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194319,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) diff --git a/the-scavanger/scenes/maps/map.tscn b/the-scavanger/scenes/maps/map.tscn index 57d7f97..c624b5e 100644 --- a/the-scavanger/scenes/maps/map.tscn +++ b/the-scavanger/scenes/maps/map.tscn @@ -2396,6 +2396,7 @@ texture = SubResource("AtlasTexture_ttkqu") [node name="conversations" type="Node" parent="."] [node name="Area2D" type="Area2D" parent="conversations"] +position = Vector2(-25, 41) [node name="CollisionShape2D" type="CollisionShape2D" parent="conversations/Area2D"] position = Vector2(24, -69) diff --git a/the-scavanger/scenes/player-npc/player.tscn b/the-scavanger/scenes/player-npc/player.tscn index ec38d23..9955d96 100644 --- a/the-scavanger/scenes/player-npc/player.tscn +++ b/the-scavanger/scenes/player-npc/player.tscn @@ -497,6 +497,15 @@ fit_content = true scroll_active = false autowrap_mode = 0 +[node name="TextEdit" type="TextEdit" parent="."] +visible = false +offset_left = -141.0 +offset_top = 15.0 +offset_right = 143.0 +offset_bottom = 79.0 +editable = false +wrap_mode = 1 + [connection signal="body_entered" from="player_hitbox" to="." method="_on_player_hitbox_body_entered"] [connection signal="body_exited" from="player_hitbox" to="." method="_on_player_hitbox_body_exited"] [connection signal="timeout" from="attack_cooldown" to="." method="_on_attack_cooldown_timeout"] diff --git a/the-scavanger/scripts/player.gd b/the-scavanger/scripts/player.gd index f666f97..9eff27c 100644 --- a/the-scavanger/scripts/player.gd +++ b/the-scavanger/scripts/player.gd @@ -1,7 +1,7 @@ extends CharacterBody2D -const speed = 100 -const dodge_speed = 200 # Speed during dodge +const speed = 250 # return to 100 before handin +const dodge_speed = 500 # Speed during dodge --> return to 200 before handin const dodge_duration = 0.5 # How long the dodge lasts (in seconds) const dodge_cooldown_time = 3.0 # Dodge cooldown (in seconds) @@ -11,7 +11,7 @@ var dodge_cooldown_active = false var enemy_in_attack_range = false var enemy_attack_cooldown = true -var healt = 100 +var healt = 64806524502 # return to 100 before turnin var player_alive = true var attack_ip = false @@ -28,7 +28,6 @@ func resetGame(): has_blue_potion = false has_red_potion = false has_green_potion = false - coin_count = 0 current_direction = "none" is_dodging = false dodge_cooldown_active = false @@ -340,41 +339,48 @@ func pickUpCoin1(body: Node2D) -> void: if body == self: $"../collectables/coins/coin1".queue_free() coin_count +=1 + print(coin_count) func pickUpCoin2(body: Node2D) -> void: if body == self: $"../collectables/coins/coin2".queue_free() coin_count +=1 + print(coin_count) func pickUpCoin3(body: Node2D) -> void: if body == self: $"../collectables/coins/coin3".queue_free() coin_count +=1 + print(coin_count) func pickUpCoin4(body: Node2D) -> void: if body == self: $"../collectables/coins/coin4".queue_free() coin_count +=1 + print(coin_count) func pickUpCoin5(body: Node2D) -> void: if body == self: $"../collectables/coins/coin5".queue_free() coin_count +=1 + print(coin_count) func pickUpCoin6(body: Node2D) -> void: if body == self: $"../collectables/coins/coin6".queue_free() coin_count +=1 + print(coin_count) func pickUpCoin7(body: Node2D) -> void: if body == self: $"../collectables/coins/coin7".queue_free() - coin_count +=1 + coin_count += 1 + print(coin_count) func wizardTalking(body: Node2D) -> void: @@ -393,8 +399,7 @@ func wizardTalking(body: Node2D) -> void: ) gameEnd() else: - print( - "Ah... you're not from this world, are you? Curious. Your aura—it's foreign, like a breeze from a land long forgotten. + var text = "Ah... you're not from this world, are you? Curious. Your aura—it's foreign, like a breeze from a land long forgotten. Fear not! I can send you back... but the spell requires three ancient potions: red, green, and blue. They're scattered deep within this slime-infested forest. Charming place, really. Oh, before you go stumbling into a slime's belly, a few pointers: @@ -403,11 +408,13 @@ func wizardTalking(body: Node2D) -> void: and to deal with trouble, just left-click or press E to strike. Now go! The forest won’t wait... and neither will the slimes." - ) + $"TextEdit".visible = true + while Input.is_action_just_pressed("ui_accept"): + $"TextEdit".text = "test" func knightTalking(body: Node2D) -> void: - if body == self and coin_count >= 7: + if body == self and coin_count >= 6: print( "...Well now. You actually returned... and with all seven coins of Lazaret, no less. @@ -428,7 +435,7 @@ func knightTalking(body: Node2D) -> void: Know this: that potion is not yours for the taking—not yet. Only those who prove their worth may claim it. - Venture into the dungeon below and retrieve the Seven Gold Coins of Lazaret. Only then will I raise this gate. + Venture into the dungeon below and retrieve the Sixa Gold Coins of Lazaret. Only then will I raise this gate. Do not return empty-handed... or not at all." )