(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: 10
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 »

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
Lemma-Class Veteran
Posts: 3785
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

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

#2 Post by Imperf3kt »

Why not just show a regular image (with positioning) and never "hide" it?
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
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

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

#3 Post by Remix »

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"
Frameworks & Scriptlets:

Vluut Games
Newbie
Posts: 10
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 »

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

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

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

#5 Post by Remix »

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)
Frameworks & Scriptlets:

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Semrush [Bot]