Page 1 of 1

Different route after a game crash or ending a route?

Posted: Mon Aug 27, 2018 11:48 pm
by Bloody-Marie
Greetings! Im new to the forums so I highly apologize if this has already been answered! I’ve just been desperate to figure out a way to pull this off but have found absolutely no clear answers!
My issue is that I am creating a game with several character routes (much like a dating sim) but in one route specifically once the player finishes it and decides to replay the game, again. A new added on scene is in the game which takes the player to a different storyline yet keeps the rest of the routes in case the player would want to continue with the rest of the characters. Im very very sorry if this is making no sense but in clearer terms.

Much like how in DDLC (spoilers!) when Sayori is found dead the game crashes and when its booted up again its a completely different game! I am wondering as to what coding causes the game to load on a different label or python!

Re: Different route after a game crash or ending a route?

Posted: Tue Aug 28, 2018 3:58 pm
by parttimestorier
I'm not entirely sure if I interpreted what you're saying correctly, but it sounds to me like you just need a persistent variable and an if/else statement. For instance, let's say that once you've done some character named Mary's route, that unlocks some character named Alice's route, and there's also a new scene with Alice at the beginning at the common route. Then, at the end of Mary's route you would want something like this:

Code: Select all

$ persistent.alice_unlocked = True
Because that's a persistent variable, the game still stores that information over multiple playthroughs. Then the beginning of your game might look something like this:

Code: Select all

if persistent.alice_unlocked:
	jump new_alice_scene
else:
	jump first_scene
Then the first thing that happens in your game will be that it decides which scene to show based on that persistent variable.