Additional "aftersplash" screen with imagemap causing errors

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:

Additional "aftersplash" screen with imagemap causing errors

#1 Post by UnitedAIRWAYS »

Hello, in my renpy game I've added additional screen with age verification imagemap. If user confirms s/he's adult, the game proceeds to main_menu screen. If not, it quits. The screen shows up automatically after splashscreen. However, it causes many problems. Let me point them out.
- main_menu music (set up through options.rpy) doesn't play at all. In-game music works just fine.
- When I start my game (either by Start() or ShowMenu('start')), a slim bar at the bottom of the screen (with back, prefs, quit etc buttons) doesn't show up. It's just not here.
- While game scripts runs, I cannot open game_menu/quick_menu by clicking Escape button as it normally works.
Clearly age verification screen is causing all of this mishap. Please help me resolve this, I'm stuck. I can provide quality memes as a reward.

Splashscreen (in script.rpy)

Code: Select all

label splashscreen:

   show splash image with fadesplashscreen
   with Pause(3.0)
   hide presplash with dissolve

call screen constent with dissolve
Age verification screen (in screens.rpy)

Code: Select all

screen constent():


        imagemap:

            idle "18idle.png"
            hover "18hover.png"
            ground "18ground.png"


            hotspot (x,x,x,x) action ShowMenu("main_menu") 
            hotspot (x,x,x,x) action Quit(confirm=None)
Main menu screen

Code: Select all

screen main_menu():

    tag menu

    imagemap:


        idle "mainmenuidle.png"
        hover "mainmenuhover.png"
        ground "mainmenuground.png"


        hotspot (x,x,x,x) action ShowMenu('start')
        hotspot (x,x,x,x) action ShowMenu('load')
        hotspot (x,x,x,x) action ShowMenu('preferences')
        hotspot (x,x,x,x) action ShowMenu('about')
        hotspot (x,x,x,x) action ShowMenu('help')

        hotspot (x,x,x,x) action Quit('quit')
        hotspot (x,x,x,x) action OpenURL("https://xxxx/")

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

Re: Additional "aftersplash" screen with imagemap causing errors

#2 Post by Alex »

The issue is that you must return from splashcreen label to enter to main menu.
So, the action in your constent screen should be Return() to just return from called screen. Then the splashscreen should be

Code: Select all

label splashscreen:

   show splash image with fadesplashscreen
   with Pause(3.0)
   hide presplash with dissolve

   call screen constent with dissolve
   # here you'll return from the screen
   return # this will return you from splashscreen to main menu
https://www.renpy.org/doc/html/screen_a ... tml#Return

UnitedAIRWAYS
Newbie
Posts: 9
Joined: Tue Jul 02, 2019 12:51 pm
Contact:

Re: Additional "aftersplash" screen with imagemap causing errors

#3 Post by UnitedAIRWAYS »

Solved music issue, but unfortunately escape button and bottom bar is still the same:(
I've changed the following using your help:

Code: Select all

label splashscreen:

   show splash image with fadesplashscreen
   with Pause(3.0)
   hide presplash with dissolve

   call screen constent with dissolve
   return

screen main_menu():

    tag menu

    imagemap:


        idle "mainmenuidle.png"
        hover "mainmenuhover.png"
        ground "mainmenuground.png"


        hotspot (x,x,x,x) action ShowMenu('start')
        hotspot (x,x,x,x) action ShowMenu('load')
        hotspot (x,x,x,x) action ShowMenu('preferences')
        hotspot (x,x,x,x) action ShowMenu('about')
        hotspot (x,x,x,x) action ShowMenu('help')

        hotspot (x,x,x,x) action Quit('quit')
        hotspot (x,x,x,x) action OpenURL("https://xxxx/")

screen constent():


        imagemap:

            idle "18idle.png"
            hover "18hover.png"
            ground "18ground.png"


            hotspot (x,x,x,x) action Return()
            hotspot (x,x,x,x) action Quit(confirm=None)



UnitedAIRWAYS
Newbie
Posts: 9
Joined: Tue Jul 02, 2019 12:51 pm
Contact:

Re: Additional "aftersplash" screen with imagemap causing errors

#4 Post by UnitedAIRWAYS »

Just changed ShowMenu('start') to Start() and now all works like a charm. You're the best Alex!

Post Reply

Who is online

Users browsing this forum: Google [Bot], henne