I’m having trouble with getting all my choices to move to the next scene. Basically, what I’ve done is write four different choices. While the choice affects how the player gets from point A to B, the final destination is the same. I’m trying to code it such that all four choices will go to the same page. As of now, only the fourth choice leads to the next scene with the code “*page break Finally, you’re home” as the scene is directly below the fourth choice I suppose.
The error I’m getting is: I’m not getting an error, but right now I’m attempting the *goto_scene code with three options. I typed the word “Home” in the scene list for startup and wrote "goto_scene Home below the page break instruction but all it does is just endlessly load.
My code looks like this:
*choice #I wait for the elevator to get bored of its shenanigans. I have a deadly fear of heights and I find myself completely frozen in shock every time this happens.
*set Thriving -3
Maybe it’s your imagination but you can hear the elevator mocking you, its soft peals of laughter grating against your brain. It knows you’re scared which only encourages it to keep up what it’s doing. But predictably, seeing you shaking in terror on the ground gets old in a few minutes and it eventually relents.
When it finally releases you to your floor, your skin is damp with cold sweat, and you almost forget to take your things with you.
*page_break Finally, you're home.
*goto_scene Home
Is that the full code? You said that you have 4 choices. Can you post the full code only with the relevant commands (ifs, sets, gotos) without the flavor texts?
I do, which fixed the problem, but I’m wondering if there’s a way to code it so i can contain almost all of it in startup? I feel at the rate I’m going I’ll end up with over 10 txt files just for a single chapter.
If you want to contain it in one file, you should use goto, not goto_scene (goto jumps around in the current file, goto_scene jumps into another file). (I’d recommend not putting it all in the startup, though, although I can’t remember why - I just have a vague recollection it might cause issues somewhere.)
Every scene you load on startup.txt must exist in form of a txt file.
*scene_list
chapter1
chapter2
chapter3
for example, all those chapter#.txt have to exist like actual files in the same location as your startup.txt.
You can divide your chapters into different files, with multiple scenes inside each one of them, or you can make a file for each scene (which I don’t recommend).
The command *goto jumps to a *label inside the same file, so you don’t need to switch from file to file every time you need to *goto somewhere else.
The way I use it, and the way I guess most of us do, is using *goto to jump to different *label scenes of your story inside the same file, like for example in chapter1.txt, and only *goto_scene or *finish to jump to another chapter if you reach the end of that chapter.
So you can have several things happen in chapter1 after you jump to chapter2. You can divide it in the way you want, as the day has passed, some important event that marks the end of the chapter, or maybe some more complex scene you want to keep separated from the rest, it’s up to you and how you organize your plot and the way you structure your game.
If you also need help with that I’ll recommend you use some mind-map tool to lay out your story so you can have a visual representation of it.
Here are some links that have a lot of information that may help you
And this is a tool I found very helpful to take notes and keep track of everything, and even create mind maps with the ability to link everything together.