How to add imagemap age verification after splashscreen and before main_menu screen?
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.
-
- Newbie
- Posts: 9
- Joined: Tue Jul 02, 2019 12:51 pm
- Contact:
How to add imagemap age verification after splashscreen and before main_menu screen?
Hello, I've recently came across such issue and got here in order to ask you experts about it:)
What I'm trying to do in my renpy game is the following:
Launch game -> splashscreen (game logo) pops up -> screen with age verification pops up(using imagemap, if user clicks he's over 18 then it jumps to the main_menu screen, if he clicks he's not, the game closes) -> main_menu or exit
I've been trying to solve this by using beforesplashscreen, but it didn't turn out... Should I use a custom screen for this, or modify splashscreen? Also, how do I add an imagemap directly to the screen? When I try to do so, an error about incorrect screen language appears.
I'd be ultimately thankful if you help me with this, my project would skyrocket from there
Cheers
What I'm trying to do in my renpy game is the following:
Launch game -> splashscreen (game logo) pops up -> screen with age verification pops up(using imagemap, if user clicks he's over 18 then it jumps to the main_menu screen, if he clicks he's not, the game closes) -> main_menu or exit
I've been trying to solve this by using beforesplashscreen, but it didn't turn out... Should I use a custom screen for this, or modify splashscreen? Also, how do I add an imagemap directly to the screen? When I try to do so, an error about incorrect screen language appears.
I'd be ultimately thankful if you help me with this, my project would skyrocket from there
Cheers
Re: How to add imagemap age verification after splashscreen and before main_menu screen?
How did you do your splashscreen (game logo) - is it a presplash image or you've made it using splashscreen label?
You can put age verification inside a splashscreen label.
https://www.renpy.org/doc/html/label.ht ... ial-labels
You can put age verification inside a splashscreen label.
https://www.renpy.org/doc/html/label.ht ... ial-labels
-
- Newbie
- Posts: 9
- Joined: Tue Jul 02, 2019 12:51 pm
- Contact:
Re: How to add imagemap age verification after splashscreen and before main_menu screen?
Thanks Alex for the reply, I've done splashscreen using a splashscreen label. I have an image (basically imagemap; with ground, idle and hover versions) which I'd like to use as said age verification, separately from game logo screen (splashscreen)
Re: How to add imagemap age verification after splashscreen and before main_menu screen?
Well, then in splashscreen label you can show logo and then show age verification screen or just use standard menu to ask player if (s)he 18+.
-
- Newbie
- Posts: 9
- Joined: Tue Jul 02, 2019 12:51 pm
- Contact:
Re: How to add imagemap age verification after splashscreen and before main_menu screen?
How do I add screen to a label? I'm kind of newbie in this
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3791
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: How to add imagemap age verification after splashscreen and before main_menu screen?
Note: code untested, merely for demonstration. May work, may not.
Use either a call or a jump.
In your case, I'd use a call and in the action of your "yes, I'm old enough" button, add something like this
Then you can do a check based on the _return variable.
Use either a call or a jump.
Code: Select all
call screen age_verification
In your case, I'd use a call and in the action of your "yes, I'm old enough" button, add something like this
Code: Select all
textbutton "yes" action Return("old_enough")
Code: Select all
if _return == "old_enough":
pass
else:
renpy.quit()
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
-
- Newbie
- Posts: 9
- Joined: Tue Jul 02, 2019 12:51 pm
- Contact:
Re: How to add imagemap age verification after splashscreen and before main_menu screen?
I don't mean to add a textbutton, because I have a separate imagemap to handle this. Thanks for the code anyway:D
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3791
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: How to add imagemap age verification after splashscreen and before main_menu screen?
You can use it with imagemaps also.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
-
- Newbie
- Posts: 9
- Joined: Tue Jul 02, 2019 12:51 pm
- Contact:
Re: How to add imagemap age verification after splashscreen and before main_menu screen?
Okay, your code worked with the imagemap twist. Big thanks!
Re: How to add imagemap age verification after splashscreen and before main_menu screen?
I'd like to use as said age verification, separately from game logo screen (splashscreen)
Who is online
Users browsing this forum: No registered users