Players can get to the *bug command (not a code error)

From what I understand, the *bug command is used to make sure that players aren’t falling out of an *if section unintentionally. The way I’m using it, it happens if you finish the RO section of a chapter and somehow don’t have a chapter to get back to.

*if (Chapter = "1")
  *goto_scene Chapter2
*if (Chapter = "2")
  *goto_scene Chapter3
*if (Chapter = "3")
  *goto_scene ending
*else
  *bug No chapter found.

Here’s my issue: I also have a Select Chapter menu. Players can skip the Prologue (which I don’t want them to) and go straight to an RO’s storyline, but then reach a *bug at the end when the game doesn’t know which main chapter to send them to.

The first solution that comes to mind is simply allowing that to happen. I don’t like this solution for the sole fact that it makes the timeline confusing. It doesn’t cause any code issues, it’s just a timeline inconsistency for players

The other thing I can do is not allow players to access the Select Chapter menu until they finish the Prologue. This will make playtesting the game more difficult though, since you can’t just go to the new content immediately

Is there anything else I can do? Any code workaround that can help?

Make it go to chapter selection of no chapter is found?

As you mentioned that you don’t want players to skip the prologue, I’d suggest gating the chapter menu so players can’t do it.

But if you would like to allow it, instead of *bug you could have something like:

*if chapter = 0
	*goto_scene ending

or

*if chapter = 0
	Restarting at Chapter 1... (or whatever chapter you'd like to put them back to)
	*page_break
	*goto_scene Chapter1

or

*if chapter = 0
	Prologue was skipped: where would you like to play from now?
	*choice
		#Chapter 2
			*goto_scene Chapter2
		#Chapter 3
			*goto_scene Chapter3
2 Likes

I think I’m leaning towards your third option, basically allow players to return to the Prologue or go further (assuming they’re doing a non-linear playthrough)

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.