I’m currently using Godot version 3.3.2, and I’m encountering difficulties with implementing a dialogue system in my 2D RPG game. Specifically, I’m struggling with managing the flow of conversations between characters and triggering dialogue sequences based on player interactions.
I’ve tried various approaches, including using signals and state machines, but I’m still facing challenges in making the dialogue system robust and flexible.
I also check this : https://forum.godotengine.org/t/i-have-an-enemy-in-my-rpg-game-but-if-the-player-walks-close-of-him-he-make-distance-between-himandtheplayerservicenow But I have not found any solution.
If anyone has experience with creating dialogue systems in Godot, could you please share your insights or suggest effective strategies for designing and implementing one? Any advice or examples would be highly appreciated.
For my interactive fiction game, I have a Dialogue scene that has a coroutine method called show_dialogue which you can pass it the message (and optionally an array of strings that will be presented as choices - it will return the choice selected). In between calling this method I set the player to be ‘interacting’ so you can’t control them anymore - so overall something like:
player.interacting = true
var dialogue = Dialogue.instantiate()
add_child(dialogue)
var choice = await dialogue.show_message("choose something", ["Yes", "No"])
# Do something with choice
player.interacting = false
These things are much more complicated than it seems on the surface. My advice I would upgrade to 3.5 and find a dialog manager in Asset Library. Even if you cant get to 3.5 there are some assets in there for older 3.X
You could take a look at Ink, maybe - afaik there are two implementations for Godot, one for the .NET version (I think it can be used from GDScript, but requires .NET), and another that’s all GDScript.
When I took Minitab online training from igmGuru, I learned how to create a workflow strategy and implement it. Therefore, I am shared my experience with you, it may be useful in your work.