How to add imagemap age verification after splashscreen and before main_menu screen?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
UnitedAIRWAYS
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?

#1 Post by UnitedAIRWAYS »

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

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: How to add imagemap age verification after splashscreen and before main_menu screen?

#2 Post by Alex »

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

UnitedAIRWAYS
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?

#3 Post by UnitedAIRWAYS »

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)

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: How to add imagemap age verification after splashscreen and before main_menu screen?

#4 Post by Alex »

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+.

UnitedAIRWAYS
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?

#5 Post by UnitedAIRWAYS »

How do I add screen to a label? I'm kind of newbie in this

User avatar
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?

#6 Post by Imperf3kt »

Note: code untested, merely for demonstration. May work, may not.

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") 
Then you can do a check based on the _return variable.

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

UnitedAIRWAYS
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?

#7 Post by UnitedAIRWAYS »

I don't mean to add a textbutton, because I have a separate imagemap to handle this. Thanks for the code anyway:D

User avatar
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?

#8 Post by Imperf3kt »

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

UnitedAIRWAYS
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?

#9 Post by UnitedAIRWAYS »

Okay, your code worked with the imagemap twist. Big thanks!

Amber96
Newbie
Posts: 1
Joined: Thu Jul 11, 2019 6:19 am
Contact:

Re: How to add imagemap age verification after splashscreen and before main_menu screen?

#10 Post by Amber96 »

I'd like to use as said age verification, separately from game logo screen (splashscreen)

Post Reply

Who is online

Users browsing this forum: No registered users