How to Show() and Hide() on different layer?

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
cheesefit
Newbie
Posts: 8
Joined: Thu Aug 09, 2018 6:46 pm
Contact:

How to Show() and Hide() on different layer?

#1 Post by cheesefit »

I have defined a new layer called "Front". How can I show it on a hovered/unhovered component?

Code: Select all

imagebutton:
    action NullAction()
    hovered Show("other_screen")   # show on Front layer?
    unhovered Hide("other_screen")  # hide on Front layer?
I get an error if I do _layer = "Front".

cheesefit
Newbie
Posts: 8
Joined: Thu Aug 09, 2018 6:46 pm
Contact:

Re: How to Show() and Hide() on different layer?

#2 Post by cheesefit »

Anyone know how?

User avatar
Kia
Eileen-Class Veteran
Posts: 1040
Joined: Fri Aug 01, 2014 7:49 am
Deviantart: KiaAzad
Discord: Kia#6810
Contact:

Re: How to Show() and Hide() on different layer?

#3 Post by Kia »

if I remember correctly there are two ways
1- using "layer" in the screen:

Code: Select all

screen example:
    layer my_layer
    ...
2- using _layer

Code: Select all

show("my_screen", _layer="my_layer")
search the documentation for _layer and see if anything changed

Post Reply

Who is online

Users browsing this forum: Google [Bot]