Adult Scenes Optional
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Adult Scenes Optional
I feel as if the Cookbook is relatively inaccurate - I followed the code and got errors up the yin yang. For the new GUI update, how do I add this to preferences?
- SuperbowserX
- Veteran
- Posts: 270
- Joined: Sat Jan 07, 2017 3:09 pm
- Contact:
Re: Adult Scenes Optional
Can you make a boolean at the top of your script ("define adultmode = False"), then at the start of the game, ask the user if they want to see them, and if they reply "yes", set that variable to True?
And then, when there's an adult scene, run an if statement that shows the scene if the variable is true, and shows a watered down version if it is false?
And then, when there's an adult scene, run an if statement that shows the scene if the variable is true, and shows a watered down version if it is false?
Re: Adult Scenes Optional
That's what I was thinking but I'm trying to avoid directly asking the user "Hey, want porn at the end of the game?" at the beginning... It's much better to just implement a button in preferences.
- Divona
- Miko-Class Veteran
- Posts: 678
- Joined: Sun Jun 05, 2016 8:29 pm
- Completed: The Falconers: Moonlight
- Organization: Bionic Penguin
- itch: bionicpenguin
- Contact:
Re: Adult Scenes Optional
script.rpy
screens.rpy
Code: Select all
define persistent.adultmode = False
Code: Select all
screen preferences():
. . .
use game_menu(_("Preferences"), scroll="viewport"):
vbox:
hbox:
box_wrap True
xfill True
## Adult Switch ###############
vbox:
style_prefix "radio"
label _("Adult Scenes")
textbutton _("On") action SetField(persistent, "adultmode", True)
textbutton _("Off") action SetField(persistent, "adultmode", False)
##############################
. . .
Re: Adult Scenes Optional
Thank you!
Who is online
Users browsing this forum: No registered users