How to recognize dialogue ended in Nathan Hoad's Dialogue Manager

Godot 4

Question

Hello! I have been using Nathan Hoad’s dialogue manager for my point and click adventure game I am making, but am having trouble getting the game to recognize when the dialogue has ended, and the script just keeps looping over and over. Here is my current code:
func _ready():
var crimescenedialogue = load(“res://Intro/CrimeScene/crimescenedialogue.dialogue”)

DialogueManager.dialogue_ended.connect(_on_dialogue_manager_dialogue_ended)
DialogueManager.show_dialogue_balloon(crimescenedialogue, “crimescene”)
func _on_dialogue_manager_dialogue_ended():
get_tree().change_scene_to_file(“res://testscene.tscn”)

Hi!

I don’t know about this dialogue manager, but seeing your code, it seems the signal is properly being listened by _on_dialogue_manager_dialogue_ended().

Is the line get_tree().change_scene_to_file(“res://testscene.tscn”) being called properly or not at all? If it is called, then dialogue end seems to be working fine and the issue is somewhere else. If not, that may mean the signal is not called.