Be forewarned, I am only used to making Visual novels in the simplest of senses--a text based story that includes art and music. Therefore, my inexperience has led me to confusion. Forgive me if the question seems to simple--looking through recipes eventually had me feeling stupid.
My goal is to have a visual novel that starts with a menu at the beginning, before the story. The menu will say something along the lines of:
"This visual novel has optional adult content. Would you like to proceed with or without said content?"
And then have the choices
"With"
"Without"
Well, it's simple enough to do that menu. However, the optional content doesn't come for several chapters, at least. How do I code it so that it goes something like this? :
Choice
With: scene 1 ---> scene 2 ---> optional scene ---> blah blah blah
Without: Scene 1 ---> scene 2 ---> blahablahblah
Thank you for your help.
Coding an optional Scene
Re: Coding an optional Scene
You'll need to store a variable to keep track of the player's choice. At the menu giving the option, do something like:
Then when you get to an optional scene:
Or you can use labels to jump past the adult content
Or whatever.
Code: Select all
"Do you want Adult Content on?"
menu:
"Yes":
$ adultcontent = True
"Okay, it's on."
"No":
$ adultcontent = False
"Okay, it's off."
Code: Select all
e "Blah blah blah this is a safe scene."
if adultcontent == True:
e "I'm naked!"
e "Safe scene again."
Code: Select all
if adultcontent == True:
jump adultscene 1
if adultcontent == Flase:
jump safeforminorsscene 1
Re: Coding an optional Scene
For a better-integrated solution, I would look at this cookbook recipe.
If you also check the manual page on persistent data, you could set the same persistent variable in the menu at the beginning that the preference is based on, and then you give the player the opportunity to go back and change their mind post-start-of-game. You could possibly also have the initial question as a splashscreen when the game first loads rather than at the very beginning of a playthrough; with a persistent variable the value will be stored regardless of playthroughs until it's changed.
If you also check the manual page on persistent data, you could set the same persistent variable in the menu at the beginning that the preference is based on, and then you give the player the opportunity to go back and change their mind post-start-of-game. You could possibly also have the initial question as a splashscreen when the game first loads rather than at the very beginning of a playthrough; with a persistent variable the value will be stored regardless of playthroughs until it's changed.
Server error: user 'Jake' not found
- Morhighan
- Miko-Class Veteran
- Posts: 975
- Joined: Sun Jun 27, 2010 12:54 pm
- Completed: AIdol, When Our Journey Ends, Forgotten Not Lost
- Organization: MysteryCorgi
- Tumblr: MysteryCorgi
- Deviantart: MysteryCorgi
- Soundcloud: MysteryCorgi
- itch: MysteryCorgi
- Location: USA
- Contact:
Re: Coding an optional Scene
Thank you very much! I will be able to use these techniques.
Who is online
Users browsing this forum: No registered users