Hello everyone, I’m seeking assistance with an issue I’m encountering while implementing an interaction system in my Godot game. I’m following the provided tutorial and utilizing Nathan Hoad’s “Dialogue Manager” plugin, but despite adhering to the instructions meticulously, I’m unable to achieve the desired functionality.
To provide further context, I’ve attached my current code snippets for both the character and the interactable area. These codes closely resemble the ones presented in the tutorial, with only minor modifications.
Character:
func _physics_process(delta: float) -> void:
if Input.is_action_just_pressed("confirma"):
var actionables = actionable_finder.get_overlapping_areas()
if actionables.size() > 0:
actionables[0].action()
return
“confirma” is spacebar, “confirm”. I’ve tried “ui_confirm” too, but the results are literally the same, so whatever.
Actionable area:
extends Area2D
@export var dialogue_resource: DialogueResource
@export var dialogue_start: String = "start"
func action() -> void:
DialogueManager.show_example_dialogue_baloon(dialogue_resource, dialogue_start)
Ps: The breakpoint doesn’t work anywhere on the Area2D/Actionable area.
I’ve thoroughly inspected the collision detection mechanism and scrutinized the code using breakpoints, yet the issue persists. I’m perplexed by this behavior, especially considering that both the plugin and Godot are up to date. During my investigation, I stumbled upon an oddity:
The interaction system FUNCTIONS CORRECTLY beyond this point:
ᅠ
However, it FAILS to operate below this point:
(Though it don’t crash or give any error message, just don’t work. Like, nothing happens).
It’s very strange. When I use code to force the file to execute, it works perfectly. Here’s the code to make it in the “forced” way:
func _physics_process(delta: float) -> void:
if Input.is_action_just_pressed("confirma"):
DialogueManager.show_dialogue_balloon(load("res://Dialogue/main.dialogue"), "start")
return
ᅠ
By the way, I just double-checked, and I did add the dialog file to the Area2D node. So this is even more confusing. Collisions work, inputs work, but I’m still not getting any responses, apart from forcing the response.
ᅠ
I would greatly appreciate any insights or guidance that could help me identify and resolve this problem. Thank you in advance for your assistance.