Replies: 1 comment
-
Hi Cat, not sure if you ended up figuring this out. There are a number of ways to do what you want, we've illustrated one (convoluted?) method over at the OpenRPG project. You would want to look at conversation_template.gd. Basically, you want to have your Dialogic UI elements (nodes derived from DialogicText, DialogicNode_StyleLayer, etc.) somewhere in the scene tree. It gets slightly more complicated with multiple styles, so it's probably easier to just start with one. Your timelines are saved as a resource (.dtl file). You can begin a timeline by calling the start_timeline method from the Dialogic global (illustrated below). Dialogic has some scene management built in, but if you're mixing genres it may be best for you to handle the transition between gameplay and the Dialogic... logic. So, you might want the gameplay to fade out to black or you may want your designed Dialogic UI to display directly over the point-and-click background. It's all game specific. So, one method would look like this:
Anyways, this is very basic, but hopefully it points you in the right direction. Happy coding! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am new to Godot 4 and Dialogic 2, and I feel very lost. I am currently making a children's reading and spelling game that combines elements of a visual narrative and a hidden object game. To do this, I am using Dialogic to manage my dialogue.
However, I have ran into an issue. I cannot find a tutorial or any information on going from a timeline to gameplay and then back to a timeline again, only that it IS possible.
I have my timeline, my scenes are already built and everything for the game works, except for changing back and forth between dialogic and the gameplay.
my nodes looks like for this scene: (sorry for the weird format, I wanted to show my tree for my nodes and wasn't sure how)
node: barn_inside
--2dSprite: barnInsideCenter
--2dSprite:: itemList
--AudioStreamPlayer2D: Game Music
--node: textHolder:
----label: bucketText (has unique name '%')
----label: applesText (has unique name '%')
----label: canText (has unique name '%')
--itemHolder:
----AudioStreamPlayer2D: foundsound
----textureButton: apples (interactive object that has signal '_on_apples_pressed' and its own script to call its label, play sound and collect item).
----textureButton: bucket (interactive object that has signal '_on_bucket_pressed' and its own script to call its label, play sound and collect item).
----textureButton: can (interactive object that has signal '_on_can_pressed' and its own script to call its label, play sound and collect item).
Do I need to put dialogic into its own scene and if so how?
How would I go about being able to move back and forth between dialogic and the gameplay?
The tutorial I previously followed to set up my hidden objects had me use unique script for each object rather than one script attached to the parent node so I have no script set up for it, and I'm not sure about how to code everything. I know I need to set up a get_tree() of some sort once the dialogic timeline is ended. But I don't know how to code it and both Godot and Dialogic don't have any real examples in their documentation, at least that I saw.
Beta Was this translation helpful? Give feedback.
All reactions