nathanhoad / godot_dialogue_manager

A powerful nonlinear dialogue system for Godot
MIT License
2.04k stars 161 forks source link

get the dialogue status or use the ended signal #629

Closed hdiazconcentra closed 1 month ago

hdiazconcentra commented 1 month ago

Hi i followed the instructions of the tutorial about use godot_dialogue_manager in godot 4 but i cant manage the dialogue status for example i want to pause the player movement when dialogue is open but the docs arent frendly about connect a method to the ended signals

example of my code:

extends Area2D

@export var dialogue_resource:DialogueResource
@export var dialogue_start:String = "start"

const Ballon = preload('res://Dialogues/Dialogues_Ballons/balloon.tscn');

func _ready():
    print("aaaaaaa")
    DialogueManager.dialogue_ended.connect(_on_dialogue_ended)
    DialogueManager.connect("dialogue_ended",_on_dialogue_ended)

func action():
    DialogueManager.show_dialogue_balloon_scene(Ballon,dialogue_resource,dialogue_start)
    #var ballon = Ballon.instantiate();
    #get_tree().current_scene.add_child(ballon);
    #ballon.dialogue_ended.connect(on_ballon_close)
    #ballon.connect("dialogue_ended", _on_dialogue_ended)
    #ballon.start(dialogue_resource,dialogue_start)

func _on_dialogue_ended():
    print(88887)
hdiazconcentra commented 1 month ago

.