[solved] Apply zorder to image?

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
User avatar
Elta
Regular
Posts: 72
Joined: Sun Jun 02, 2019 6:28 pm
Tumblr: limitelta
Deviantart: limitelta
itch: limitelta
Contact:

[solved] Apply zorder to image?

#1 Post by Elta »

So I've been looking for ages and can not seem to get this one, even though it seems like the answer should be easy to figure out.
I'm extremely new to this... but get the feeling if there is a way I'm going to do a face palm because I should have been able to figure it out...😅

Is there a way to apply a zorder to one image, so that whenever I use the "show ___" it always shows above the other characters?
(Or some other way other then zorder, just some way to make it go on top.)
Thanks for any help! 💕
Last edited by Elta on Fri Jun 28, 2019 11:40 am, edited 1 time in total.

User avatar
Alex
Lemma-Class Veteran
Posts: 3090
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: apply zorder to image?

#2 Post by Alex »


User avatar
xavimat
Eileen-Class Veteran
Posts: 1460
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Contact:

Re: apply zorder to image?

#3 Post by xavimat »

Have you tried this?

Code: Select all

show myimagewithprimadonnacomplex zorder 999
https://www.renpy.org/doc/html/displayi ... ght=zorder

EDIT (it doesn't):
Never tried this, maybe it works:
image primadona:
"primadonna.png"
zorder 999
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

User avatar
Elta
Regular
Posts: 72
Joined: Sun Jun 02, 2019 6:28 pm
Tumblr: limitelta
Deviantart: limitelta
itch: limitelta
Contact:

Re: apply zorder to image?

#4 Post by Elta »

xavimat wrote: Fri Jun 28, 2019 10:58 am Have you tried this?

Code: Select all

show myimagewithprimadonnacomplex zorder 999
Oh my goodness...😳 As I thought I was just being very slow minded I was using the wrong number! Thank you so much this works just fine! 💗
(Why is it always the simple things that trip me up! XD)

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: apply zorder to image?

#5 Post by Remix »

You can assign tags to specific zorders using:

Code: Select all

init python:
    config.tag_zorder["eileen"] = 10
    config.tag_zorder["lucy"] = 8
Which would always show eileen tag images in front of lucy tag ones...

If you were just looking for a way to bring the "current speaking character" to the front (and you set the image="tagname" bit in your Character definitions) you could automate it by using something like the snippet in this post
Frameworks & Scriptlets:

User avatar
Elta
Regular
Posts: 72
Joined: Sun Jun 02, 2019 6:28 pm
Tumblr: limitelta
Deviantart: limitelta
itch: limitelta
Contact:

Re: apply zorder to image?

#6 Post by Elta »

Remix wrote: Fri Jun 28, 2019 11:47 am You can assign tags to specific zorders using:

Code: Select all

init python:
    config.tag_zorder["eileen"] = 10
    config.tag_zorder["lucy"] = 8
Which would always show eileen tag images in front of lucy tag ones...

If you were just looking for a way to bring the "current speaking character" to the front (and you set the image="tagname" bit in your Character definitions) you could automate it by using something like the snippet in this post
Oh wow, this is really lovely to know! Thank you so much!😃 I'll defiantly be using the info you just shared in the future, that helps out a ton!🤗

Post Reply

Who is online

Users browsing this forum: Google [Bot]