Yarn Freezing my game (SOLVED)

How do I…

Hey there everyone! I’ve been dealing with this… very strange glitch that I can’t seem to figure out. I looked around in the ‘How do I…’ forums and though I found things similar, nothing that seemed to answer what I need exactly. I tried to do corrections, but I’m absolutely stumped.

I have two quests that I’ve just programmed into my game. One, is upgrading a Dog Park with money, and the other, is donating money to a Fertilizer Fund. Both quests are programmed exceedingly similar because of this.

The quests seem to work if I’m not clicking the ‘select’ key a bunch during dialogue. Essentially, I’m pressing the button a bunch, in the same way you’d try speeding through dialogue in any other game.

Right after I choose an option in-game, and click the select button again before dialogue has finished typing, it completely freezes! This only seems to happen after an option has been pressed, and I’m completely frustrated and stumped. My entire game runs off of quests and branching dialogue like this, so if I can’t fix it, I literally can’t make my game. ):

I’ve tried retyping the options into a new JSON file, and that didn’t work either, which makes me think it MUST be something I’ve done with my own code.

Related screenshots

This is the code within the scene itself.

This is in an external folder, linked into the scene.

These are what the dogpark updates look like within the Yarn file

This is what the code up code looks like for updating with 250 coins

And this is a gif of the freezing in action!

Once again, the glitching only seems to happen after I’ve clicked an option, and kept clicking afterward. If I’m just having regular dialogue with a character, no freezing happens. Please help, I’ve googled it, I’ve searched through the forums, and all the fixes I’ve tried don’t work.

Thank you so, so much in advance yall.


Okay so turns out, if you’re doing an ‘elseif’ statement, it looks like you want some sort of dialogue beforehand. Once I added text before the elseif statements start up? No freezing happened! Like this:


Way to go on figuring it out, I am working with Yarn as well and having some issues with commands myself.

Since your problem has been solved, I honestly just wanted to fawn over your visuals. I really like them and I could totally see a lot of people taking a break to enjoy a little slice of what appears to be a pretty peaceful game.

Hey, thanks so much!! I’ve been working on this game since 2020! It’s a mix between a metroidvania, and a friend sim. I used to struggle with how I could merge the two concepts, but I think I’ve got a few really good ways to make it work!

If you have any questions with Commands, I’ve been able to make them work with most everything I’ve done, including making cut scenes happen, starting boss battles, show and hide profile images, ect ect. I’m definitely not a pro at programming (there are WAY better programmers on here than me) but I can always offer a suggestion!

1 Like

Hey, thank you! I will absolutely be reaching out soon I can imagine as there it seems like every time I learn something I find something new I need to learn how to do at the same moment.

That sounds like a really interesting concept you have going on there and I hope we get to play it soon!