Showing a screen within a 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
User avatar
Tritonials
Newbie
Posts: 16
Joined: Fri Sep 21, 2018 6:32 pm
Completed: None. Still learning how to code.
Contact:

Showing a screen within a screen?

#1 Post by Tritonials »

My visual novel has tons of imagemaps, and the point of my visual novel is to move around different places. But i also need to show money or variables. I tried screens but the imagemap screen overlapped the variables screen.

Can i somehow show a screen within a screen or is there other way?

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Showing a screen within a screen?

#2 Post by trooper6 »

Just give the screens with the money/variables, etc. a higher zorder, it will make it show up above screens with a lower zorder:
https://www.renpy.org/doc/html/screens. ... -statement
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
Tritonials
Newbie
Posts: 16
Joined: Fri Sep 21, 2018 6:32 pm
Completed: None. Still learning how to code.
Contact:

Re: Showing a screen within a screen?

#3 Post by Tritonials »

Okay, i did what you did. I set the zorder level for the variables screen to 1 and the imagemaps to 0.

Code: Select all

screen hello():
    zorder 1

    frame:
        xpadding 40
        ypadding 10
        xalign 0.5
        yalign 0.0


        hbox:
            text "[money]"
            null height 10


screen bedroom:
    zorder 0
    imagemap:
        if time_of_day[0] == "Night":
            ground "bedroom_night.jpg"
            hover "bedroom_night_hover.jpg"

            hotspot (123, 456, 789, 100)action Jump("etc")
           
        else:
            ground "bedroom.jpg"
            hover "bedroom_hover.jpg"

            hotspot (123, 456, 789, 100) action Jump("etc")
            
Some imagemaps show the variables screen while still showing the imagemaps but not all do. I also set ALL imagemaps to zorder 0 while the screen variables to 1.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3792
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Showing a screen within a screen?

#4 Post by Imperf3kt »

You can use the "use screen_name" screen language.
Depending on how you set up your screens, that is.

It generally goes at the bottom of your screen code, but it depends where you need it to show up.
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

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Showing a screen within a screen?

#5 Post by trooper6 »

So it works with some imagemaps but not others. What is the difference between the times when it works and the times it doesn’t? Is there difference in your screen code or how you show/call the screens?

If you are getting different results, then something different is in the code. Try to isolate that difference.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
Tritonials
Newbie
Posts: 16
Joined: Fri Sep 21, 2018 6:32 pm
Completed: None. Still learning how to code.
Contact:

Re: Showing a screen within a screen?

#6 Post by Tritonials »

Ah, sorry for the late reply but all i had to do was restart the game! I'm very sorry for wasting your time. Although, thanks for all your help and effort.

Post Reply

Who is online

Users browsing this forum: Karrion