(Solved)Need a Persistent/Hidable Image to display on top of textbox

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
Vluut Games
Newbie
Posts: 5
Joined: Tue Jan 09, 2018 12:45 am
Tumblr: vluutgames
itch: vluut
Contact:

(Solved)Need a Persistent/Hidable Image to display on top of textbox

#1 Post by Vluut Games » Thu Jan 11, 2018 4:02 am

I am using 6.99.13 and trying to figure out how to display (and hide) an image above the say_window, like a side image, but I want it to be persistent regardless of whose talking and only hide when I tell it to. This will be the protagonist, so it won't just be one image as they will display emotions - but the main point is to put it on top of the textbox and everything else.

I have tried setting the zorder of the say screen to 1 and the zorder of the image to 2 and the text box still appears above the image. I set the zorder of the image to 500 and no better. The say_window does not appear to accept zorder as a style parameter. I'm not sure where to set the zorder to force this image(or others) to the top.

Thanks for any help!

Andrews
Vluut Inclusive Games
www.vluut.com
Last edited by Vluut Games on Thu Jan 11, 2018 10:53 pm, edited 1 time in total.

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

Re: Need a Persistent/Hidable Image to display on top of textbox

#2 Post by Imperf3kt » Thu Jan 11, 2018 6:04 am

Why not just show a regular image (with positioning) and never "hide" it?
Image

Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

User avatar
Remix
Miko-Class Veteran
Posts: 708
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I cannot draw very well)
Projects: An un-named 3d anime based trainer game
Contact:

Re: Need a Persistent/Hidable Image to display on top of textbox

#3 Post by Remix » Thu Jan 11, 2018 8:11 am

Ren'py only uses zorder within each screen for displayables (or layer for screens) as far as I know.
Presuming you are not adding the image to the say screen, maybe just set the layer when shown...

show image_ref onlayer "overlay"

Vluut Games
Newbie
Posts: 5
Joined: Tue Jan 09, 2018 12:45 am
Tumblr: vluutgames
itch: vluut
Contact:

Re: (Solved)Need a Persistent/Hidable Image to display on top of textbox

#4 Post by Vluut Games » Thu Jan 11, 2018 10:55 pm

Brilliant! Thank you! That worked! Now that I understand layers I'm going to make a million of them!

User avatar
Remix
Miko-Class Veteran
Posts: 708
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I cannot draw very well)
Projects: An un-named 3d anime based trainer game
Contact:

Re: (Solved)Need a Persistent/Hidable Image to display on top of textbox

#5 Post by Remix » Fri Jan 12, 2018 7:35 am

lol, have fun.

For info, Ren'py as standard generally has 4 layers: [ 'master', 'transient', 'screens', 'overlay' ]
The current best practice to add your own layers to that is with renpy.add_layer(layer, above=None, below=None, menu_clear=True)

Post Reply

Who is online

Users browsing this forum: No registered users