[solved] simultaneous appearance of the screen and the next label

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
Leviy
Newbie
Posts: 8
Joined: Sun Dec 23, 2018 5:09 am
Contact:

[solved] simultaneous appearance of the screen and the next label

#1 Post by Leviy »

Hello. I want the player to call up a screen with information about themselves at any time of a game and the screen to be returned to the moment of the game where he stopped. But when I click on the button with the appearance of the information screen the transition to the next label occurs. Please, help.

button of calling
screen aboutme:
vbox align (0.99,0.9):
imagemap:
ground "scene/aboutme.png"
hover "scene/aboutme_hover.png"
alpha True
hotspot (1, 0, 333, 79) action Jump("about_me")

label about_me:
show screen about_me

screen about_me:
frame align (0.63,0.5):
has vbox
hbox:
text "Information about player"
hbox:
textbutton ("Close") action Hide("about_me", transition=None)
Last edited by Leviy on Mon Aug 26, 2019 10:20 am, edited 1 time in total.

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: simultaneous appearance of the screen and the next label

#2 Post by isobellesophia »

Leviy wrote: Sun Aug 25, 2019 8:20 am Hello. I want the player to call up a screen with information about themselves at any time of a game and the screen to be returned to the moment of the game where he stopped. But when I click on the button with the appearance of the information screen the transition to the next label occurs. Please, help.

button of calling
screen aboutme:
vbox align (0.99,0.9):
imagemap:
ground "scene/aboutme.png"
hover "scene/aboutme_hover.png"
alpha True
hotspot (1, 0, 333, 79) action Jump("about_me")

label about_me:
show screen about_me

screen about_me:
frame align (0.63,0.5):
has vbox
hbox:
text "Information about player"
hbox:
textbutton ("Close") action Hide("about_me", transition=None)

Code: Select all

screen about_me:
frame align (0.63,0.5):
has vbox
hbox:
text "Information about player"
hbox:
textbutton ("Close") action Hide("about_me", transition=None)
Making sure that it has a return label, like

Code: Select all

screen about_me:
frame align (0.63,0.5):
has vbox
hbox:
text "Information about player"
hbox:
textbutton ("Close") action Return()
Or you can also use when going in the next label, used when starting the real game

Code: Select all

screen about_me:
frame align (0.63,0.5):
has vbox
hbox:
text "Information about player"
hbox:
textbutton ("Close") action Jump("real_startgame)
Please try it, i dont really know about this, just making it a test for you to work.
I am a friendly user, please respect and have a good day.


Image

Image


Leviy
Newbie
Posts: 8
Joined: Sun Dec 23, 2018 5:09 am
Contact:

Re: simultaneous appearance of the screen and the next label

#3 Post by Leviy »

@isobellesophia
both methods don't work, because this button may be pushed from any label.

i tried this function in button: hotspot (1, 0, 333, 79) action [ui.callsinnewcontext("about_me")]

and I added "pause" and "return" in this label:
label about_me:
show screen about_me
with dissolve
pause
return

Now it works!

User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: [solved] simultaneous appearance of the screen and the next label

#4 Post by namastaii »

Why do you need a label to show the screen? Maybe I'm misunderstanding and you're using it that way for a reason but what I would do is have a screen that always shows and it's just a button. If the player clicks the button, it "shows" the about_me screen and they can close it when they're done looking. no label has changed and they're still where they are in the game and the button in the corner is still accessible. Is this the scenario you want?

User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: [solved] simultaneous appearance of the screen and the next label

#5 Post by namastaii »

Code: Select all

screen about_me_button():
    hbox:
        xalign 1.0
        textbutton "About Me" action Show("about_me")

Code: Select all

screen about_me():
    modal True
    frame:
        xalign 0.5
        yalign 0.5
        vbox:
            text "some information here"
            textbutton "exit" action Hide("about_me")

Code: Select all

label start:
    show screen about_me_button

Leviy
Newbie
Posts: 8
Joined: Sun Dec 23, 2018 5:09 am
Contact:

Re: [solved] simultaneous appearance of the screen and the next label

#6 Post by Leviy »

@namastaii
Yes, this is what i want! Thank you!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]