Basically at each checkpoint you have the option to restart the game or continue from your checkpoint (usually takes you back to a point where you can succeed if you just happened to click the wrong option or something).
I used
#restart checkpoint
*goto checkpointname #restart the game
*goto start
#“It is pretty quiet out here. Peaceful.” choice option is missing a *goto, so maybe that’s why it jumps to the next ripley label. I’ve also noticed you sometimes put a *finish after a *goto, which in unnecessary, *finish marks a transition to the next scene text file. It follows the *scene_list order from startup.
Thanks. I’ve also noticed that at times when the entirety of the crew has a relationship change, it’s rather tedious to type out each of their variables.
I know there’s a way to make that a single variable but I can’t remember what it’s called. Do you know? I can look it up. I just need to know what to look up.
I actually couldn’t get the gosub to work when it was in a file of its own. Is there something I’m missing? It would always tell me something. I can’t remember what since I stopped trying after about 30 times in.
For gosubs in other files, would I use them similar to a scene file? I did *gosub cap_stats in the startup file.
*gosub is for calling a subroutine in the current scene file. *gosub_scene is for calling a subroutine in a different scene file.
Gosub works like goto, except you need a *return command in the label you’re going to. Once a *return is triggered, game returns to the line where *gosub was originally called from and proceeds from there.
Gosub_scene has a slightly different format. It’s
*gosub_scene scenename labelname
Also requires a *return. Wiki details all of this with examples, check it out.
#"Polanski, do you mind if I speak with you privately?"
*if (Polanski >= 50)
*goto PolanskiPrivate
*else
*goto ClarkIntervention
#"Clark, you have a moment to talk?"
*goto ClarkPrivate
*selectable_if (Engineering >= 40) #"Check the transformer. Fleet Engineers tend to miss that."
*set Polanski +2
*set Clark +2
*goto LaunchEngineeringImproved
#"Just checking in on you two. I'll get going now."
*goto Preparations
If possible, I highly recommend you start using CSIDE. Not only will it catch some of the formatting errors (like an extra indentation), but it also has a feature called “stepping” that shows you, line-by-line, where the code is going.
Whenever I find my game skipping over a section, it’s because I failed to properly set up my if/choice stack. The code, when it can’t find what to do, just skips down to the next thing on the list, in that case.
Pro tip: make sure your variables (such as Polanski and Clark) are all LOWERCASE! The same is true for your labels.
It’s general good coding practice, because many coding languages are highly case sensitive. ChoiceScript has been built to be less so; variables and labels are not case sensitive (just double checked this using CSIDE). So I don’t think it would cause trouble here. But it’s a good habit to get into and if nothing else will increase your typing speed on variables.
I have another error in the code that was working before I moved everything into scenes. Someone said C-Side? Does anyone have a link?
Edit:
Asking because I highly doubt that a sports team or hip hop group is what I’m looking for which is what Google shows me.
#"Wondering if you wanted to do something other than work out right now."
*if (Peters >= 60)
*goto PetersDate
*else
"No."
*goto PetersChoices
#"Carry on, Peters."
"Affirmative. I'll get back to beating the locals until they understand that messing with a human isn't a wise decision."
*goto StationChoices
This is the code in question. It’s telling me that it’s illegal to fall out of a *choice statement. I’ve tried messing around with the indents. Didn’t work. Either it tells me it expected a # option or the above. It was working before when everything was in a single file as a side note.