Ren'Py Show image on top of a image?

monkeyposter_7

Thirsty for my Guest
Game Developer
Nov 23, 2018
330
1,179
in repny, is there a way to show one image over the other (but the second image has to transparent, the one on top)

Untitled-2.jpg
 

mickydoo

Fudged it again.
Game Developer
Jan 5, 2018
2,446
3,545
I do it like this. In options rpy up the top look for
define config.layers = [ 'master', 'transient', 'screens', 'overlay' ]

And put over_screens between screens and overlay
define config.layers = [ 'master', 'transient', 'screens', 'over_screens', 'overlay' ]

Then when you want to use you type show image "my=image" onlayer over_screens

To hide it you need to type hide image "my=image" onlayer over_screens, or it wont hide

I got it from here a while back
 
  • Like
Reactions: monkeyposter_7

Rich

Old Fart
Modder
Respected User
Donor
Game Developer
Jun 25, 2017
2,452
6,906
You don't necessarily have to go to all that complexity.

Code:
    show image1
    show image2
image2 will be displayed after image1, which means that it will be on top. (images are shown back to front within any particular layer.)

If it's necessary to show the images at different times and maybe image2 will get "show"n before image1, you can use the "zorder" option to make sure that image2 is closer to the user than image1, by giving image2 a large zorder.

zorder is how, for example, Ren'py guarantees that the "quick menu" will always be in front of the "say" panel. (This is with screens as opposed to images, but the theory is the same.)
 
  • Like
Reactions: anne O'nymous