When I try to start my dialogue tree, it does not come over to the external layout. All of the same dialogue-related objects- text boxes, bitmap texts, options text, and buttons- are in my external layouts since they are references in the main game scene.
But, I noticed that within the debugger, the visibility of my dialogue objects (except for the dialogue’s own text box only) read as “is hidden?: true”. And if I manually set my dialogue text to “is hidden? false” then it shows me the default bitmap text string, and not even my own default text string.
I am confused, because if the dialogue text box is visible, then why aren’t the rest of my dialogue objects visible as well?
Without external layouts, my dialogue tree works fine. I followed HelperWesley’s tutorial on creating levels from external layouts and global variables, which works as it should.
What is the expected result
When I run the game, my dialogue tree should show up when I start an interaction with an NPC object, as my scenes are External Layouts.
What is the actual result
When I interact with an NPC object, only my dialogue text box object shows on the screen, and not the usual yarn node dialogue I had set up. Because of this, my player cannot start the quest that is connected to my yarn dialogue.
I am unable to upload the game file, as it does not give me a file link button anywhere that I can see, and dragging my files in brings up an error “file type not supported, only jpeg/png/gif”
But the default said I can upload a .zip or .rar file?
Where in the scene event do you create the objects from the external layout?
Also, the objects the external layout uses will need to be in the scene that references the external layout, unless they are global obejcts.
When you create an external layout, you need a scene as the reference base. The objects in the base scene are what the external layout uses.
The external layout does not have objects in it - it references those in the base scene. If you add objects to an external layout, you are actually adding them to the base scene. Similarly, if you remove objects from an external layout, you are actually removing them from the base scene.
Thank you for the response! I forgot the show where I had my external events that created and called under the blue “Level Change” event group.
I ended up going to a previously saved game backup before I bugged everything out, went a lot slower with implementing my external event logic, and got it working!
Since I have no clue what was creating the issue with my dialogue not showing up, I’ll probably delete or close this help post since I don’t know where I have the relevant game save file for it anymore.
As I’m trying to take a more logic/programming-first approach to building my games (compared to art and animation first), I’m running into bugs in the game’s functions and logic…so I’ll probably make another help post eventually
Before I tried external layouts, I was focused in one scene that my dialogue played in. The condition I was using the activate my yarn was a variable called: “NPC.VariableString(branch)”, which looked at the variable “branch”, in each object in my NPC object group.
This way, instead of having a “start branch from node xyz” for every NPC, I only had one beautiful condition.
Unfortunately, that same string “NPC.VariableString(branch)” did not register at all when I tried using external events. At first I thought I had to make sure the NPC object had the variable “branch” and not just its instance…but that didn’t fix the issue of my dialogue not playing.
What did fix the issue was writing the name of my yarn node as most do, so when I did “start branch from node ‘purple’” THEN my dialogue started working.
When I tried to type in “VariableString()” it didn’t auto-complete, and I could not find it in the expression list? I found “VariableString()” in the Yarnilla game example, which worked up until I used external events.
A follow-up for anyone still reading down here: If “VariableString()” doesn’t exist (I can’t think of a better word since I can’t find it in the expressions), is there a new way that I can call my yarn branch nodes dynamically?
The way variables are handled is a little different these days, and I expect some of those older GDevelop demos use the old way. If you want to launch a branch based on a variable, you simply type the name of the variable. For example:
I have never tried starting branches dynamically, and haven’t tested such a system, but perhaps the above can help you get started.
Thank you for the reply! I haven’t seen that string before, and I keep getting a red error underlined as I’m trying to use it. What is your breakdown for those three expression calls? (can’t think of a better terminology)
What I did was name my yarn file first, then the object name, and then the variable ID name (both have the same name)
Example of all the types of branch activating works
Well, all but “assets\flowerQuestScript.purple.purple”, and “NPC.branch” say it’s a valid expression but doesn’t actually run, so I’m not sure what’s disconnected with that since that’s what I hoped to have working
Edit: As I’m playing around, there may be a disconnect between calling my dialogue within an external layout. Like how “NPC.VariableString(branch)” works in a scene, but not in an external layout? Then again, “NPC.VariableString()” doesn’t seem to register in newer engine updates, so that could be the reason for that one at least…
dialogue.stage.npc1 is a variable that I made. It’s not a special GDevelop or Yarn thing. dialogue is a structure variable. stage is a structure variable child of dialogue. And npc1 is a child of stage. It’s a string variable containing the node name “hello”. I did a quick test and it successfully launches the “hello” node that I set up in the Yarn editor. In my original post I was making the point that you can use a variable to launch a branch by simply typing the name of the variable into the ‘Start dialogue from branch’ action. You no longer need the VariableString thing first.
You are using a backslash in your expression assets\purple… etc. I am not sure what you are trying to do there, but that won’t work to access a variable or node name.
It also looks like you are tyring to start five branches at once. Where are all those texts being displayed? You would need several different text objects if you want to launch that many nodes at the same time.
All you need to do is give the ‘Start dialogue from branch’ action a valid node name (a string) that exists in a dialogue JSON file that an earlier event (higher up) has loaded. That is possible using a variable, though I do not have time to test object variables or the variables of objects within a group (I need to go to bed!
Note to self: Do not do game dev and write in the forum after being up since 5:30 am before work…and then be late for work
I did manage to start my dialogue branch through either the object’s variable or through a global variable instead.
I’m lowkey tired from work and I’ve probably glossed over a solution by overthinking it. Thank you for your input!
(I guess I’m mainly not sure why the old expression I was using works to start my dialogue in a scene directly, but not if creating a scene using external layouts . Eh, could be that it’s an old expression. )
(And the photo I showed of all the dialogue branch starts are just examples of the ones that I’ve tried so far. I just put them in one event to take one screenshot. That’s not how I literally start my branches. I can see how I made that confusing. )
Each are slightly different but work the same way. I deactivate/delete whichever method I’m not using, so both are not used at the same time!!
I’m also using @H0ndredExdialogue combo extension ! (Which is why my events look different than the usual yarn events, but the variables and logic should still work with the usual yarn events).
Thanks again @worriedpixels for the feedback, it helped me think through my logic to get this working and solved! <3