[Solved] Yarn node won't change over

I think Yarn hates me, or I’m stupid, because I’ve ran into another problem that I haven’t seen a solution to anywhere.

As an explanation as to what the hell is going on here, Scene 1 runs over to scene 2 with the dialogue state variable thing just fine. Scene 2 runs and when options are presented, it goes to the Selection scene (so the entire dialogue doesn’t repeat as you flick back and forth between options.) When you eventually pick the Job option, the dialogue runs as normal. But when it ends, it doesn’t go onto scene 3, though the dialogue state variable is at the correct number. Nothing problematic is in Scene 3, I don’t think. There is the dialogueTextName command which should work as it does in every other scene, and there is a spriteVal command, which has the same coding as my other sprite which displays in Scene 2, so it should also work. I can’t think of what the problem is. Other screenshots that may help below:

I feel like such an idiot for posting here so often, but I’m not very good with Yarn yet, so the obvious flies over my head right now. Any help is appreciated!

How does jobscene2, victimscene2 and the other one (I can’t see it properly) get to scene 3 when they’re done? Could you post a screenshot of just one of them in full? It would also be good to see Scene1’s text in full. I’ve haven’t done particularly advanced Yarn stuff, but I have used Yarn variables to make a simple shop interaction and have also made several Yarn YouTube tutorials. I’ll try to help.

They’re accessed through options, which I think I mentioned before.

The Police (the one you can’t see) and Victim nodes are basically the same, but in Victim it sets the variable VictimRead to true, so Job will become an option, which you can see above.

Scene 1 is literally 4 lines of regular dialouge, pretty similar for Scene 2 but it just sends you to Scee 2 Selection at the end.

The arrows are hard to see on my screenshot, but Police and Victim have 2 way arrows, so after the dialouge in that node is finished, it sends you back to the selection node. However, Job is only 1 way as that is how it gets onto Scene 3. I can’t get it all in one screenshot, so bare with all the writing.


The last line there talking about a police officer ends the dialogue branch for Scene 2, and from there it should run onto Scene 3, which has the same set up and command types, which shouldn’t be breaking it.

I’ve only had a quick glance at your screenshots before going to bed (5.30am start tomorrow), but you don’t appear to have [[scene3]] at the end of jobscene2, so it will never take you to scene3. The name ‘scene3’ means nothing to Yarn, even though it seems logical that it would go there after scene2. You could call them christmasbells1 and christmasbells2, and Yarn would be no less inclined to jump from one to the other unless you tell it to :smiley:

I’ve just done this, but now Scene 3 is skipped over completely and Scene 4 plays, after the last line of JobScene2 plays and glitches

(Above with the red is Scene 4)

Edit: here’s the dialogue for Scene 3, but I can’t see anything that could be breaking it here.

I may have misunderstood what you were trying to do before. Sorry about that. So, this is your situation, if I understand correctly:

  1. Scene1 works. Dialogue ends.

  2. Scene2 works. The player gets to the end of either VictimScene2 or JobScene2. Dialogue ends. You don’t want to link to [[Scene3]] from within these nodes, which is what I originally thought. You want it to end here, and then Scene3 is launched the next time dialogue happens. That’s how you events are set up.

  3. Scene4 is launched instead of the expected Scene3. This is your current problem.

I can’t see anything wrong with your Scene3 dialogue, but I suggest copying it somewhere safe (a txt doc), delete all the text in Scene3 (select all and delete, to be sure) and change Scene3’s text to just 2 or 3 simple lines with no commands. Don’t copy from a Word doc or use special characters: just type directly into the node a few lines of text. See if that works. If your game still jumps to Scene4 after Scene2 is over, and it ignores Scene3, then at least you’ll know there’s nothing wrong with the node contents and that it’s more likely something in your events that is the issue.

One other suggestion: are you using the same button to launch your dialogue and advance through it? This can cause issues if you’re not using ‘trigger once’ in the dialogue launch events: it’s possible to accidentally skip ahead to the next dialogue, though that’s only really a risk if your nodes just had one line of dialogue in them. But try adding a ‘trigger once’ to the dialogue launch events.

I quickly recreated a simpler version of your system tonight and it works fine for me, but if I could see all your dialogue events I might spot something wrong. Or perhaps someone else on the forum might.

You’ve pretty much got it right, but only JobScene 2 should continue onto Scene3. I might have made that unclear.

I did remove my text from Scene3 and added a few random lines and then it worked okay, so I know it is a problem with my Scene3 dialogue. Oddly enough, it now loops back to Scene2, as well.
Edit: I’m stupid, I connected Scene1 and Scene2 with a node link, so the dialogue state variable was still at 1 by time the code got to Scene4, so it played Scene2 again. It’s been fixed now and all seems to work fine. I just have to find the mistake in my code.

Edit 2: for god’s sake i found the issue. goddammit.
I did initially add all the screenshots of my code, but I found my issue. If you still want them, I can give them to you. Thank you for all your help, sorry I didn’t thank you before (Your original post was in my inbox, so I saw what you said.)

I thought I deleted that comment in time :slight_smile: I felt cheeky after writing the thank you thing, and I also gave a load of advice about [[links]] which didn’t really relate to your issue, so I wrote a second reply after going over your events again and understanding your problem better.

I’m happy it worked out in the end.

The tip about replacing your dialogue with basic text is a good way of seeing if the issue is in your node or in your events. Also, be careful if pasting dialogue written in Word or another word processor. It’s probably fine, but it’s not a bad idea to paste into Notepad first, then into Yarn, so you know you’re pasting plain text and no weird characters. That’s what I do anyway. Happy Yarn-ing!

Yeah, the first reply you send will get sent to my inbox aha, so I do see them. I’ll use that advice too, as I am copying from a Word document and I will start using random lines of dialogue for testing. Thanks! :slight_smile:

1 Like