[Solved]How do I show all the layers at once?

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
JinzouTamashii
Eileen-Class Veteran
Posts: 1686
Joined: Mon Sep 21, 2009 8:03 pm
Projects: E-mail me if you wanna rock the planet
Location: USA
Contact:

[Solved]How do I show all the layers at once?

#1 Post by JinzouTamashii »

I remember seeing it somewhere but forum search, Wiki, and demo game have all failed me ...
Last edited by JinzouTamashii on Wed Oct 07, 2009 8:58 am, edited 1 time in total.
Don't worry, we can get through it together. I didn't forget about you! I just got overwhelmed.
https://cherylitou.wordpress.com

Alex

Re: How do I show all the layers at once?

#2 Post by Alex »

What does it mean "show all the layers at once"? What do you want to see on screen?

JinzouTamashii
Eileen-Class Veteran
Posts: 1686
Joined: Mon Sep 21, 2009 8:03 pm
Projects: E-mail me if you wanna rock the planet
Location: USA
Contact:

Re: How do I show all the layers at once?

#3 Post by JinzouTamashii »

Image I want to show the background, the character, an object sprite, and another overlay (transparent PNG) all on the screen at the very same time without combining all the images together...
Don't worry, we can get through it together. I didn't forget about you! I just got overwhelmed.
https://cherylitou.wordpress.com

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: How do I show all the layers at once?

#4 Post by Aleema »

You can show however many things you want with the "show" command.
In fact, they will keep showing until you tell them to "hide" (or call another image within the same subset).

Overlays, if configured right, will only show when you set their conditional to True.

JinzouTamashii
Eileen-Class Veteran
Posts: 1686
Joined: Mon Sep 21, 2009 8:03 pm
Projects: E-mail me if you wanna rock the planet
Location: USA
Contact:

Re: How do I show all the layers at once?

#5 Post by JinzouTamashii »

I'm not making myself clear somehow ... maybe there is a language barrier...

I want everything to appear all at once, with a dissolve. Multiple things. Not one at a time.
Don't worry, we can get through it together. I didn't forget about you! I just got overwhelmed.
https://cherylitou.wordpress.com

Melkoshi
Regular
Posts: 156
Joined: Tue Jun 02, 2009 8:56 pm
Projects: Jewels of Sytinane
Location: U.s.a.
Contact:

Re: How do I show all the layers at once?

#6 Post by Melkoshi »

Dont quote me on this. but I think it's

show ---
show---
show---
with ---effect here---

I'm asumeing your doing "show--- with -effect-"?
--- My DeviantArt.
Game in Progress for demo-teaser:
story(script) = 45%
sprites = 100%
programming(interface) = 35%
CGs = 0%
Backgrounds = 5%
Music/sound = 0%

JinzouTamashii
Eileen-Class Veteran
Posts: 1686
Joined: Mon Sep 21, 2009 8:03 pm
Projects: E-mail me if you wanna rock the planet
Location: USA
Contact:

Re: How do I show all the layers at once?

#7 Post by JinzouTamashii »

Yes.

Thank you, I will try it and get back to you.
Don't worry, we can get through it together. I didn't forget about you! I just got overwhelmed.
https://cherylitou.wordpress.com

JinzouTamashii
Eileen-Class Veteran
Posts: 1686
Joined: Mon Sep 21, 2009 8:03 pm
Projects: E-mail me if you wanna rock the planet
Location: USA
Contact:

Re: How do I show all the layers at once?

#8 Post by JinzouTamashii »

I have thought a long time about this and found another way to put it.

I want to create a "stack" of images and show all of those layers at once with the show command with dissolve.
Don't worry, we can get through it together. I didn't forget about you! I just got overwhelmed.
https://cherylitou.wordpress.com

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: How do I show all the layers at once?

#9 Post by Jake »

JinzouTamashii wrote:I want to create a "stack" of images and show all of those layers at once with the show command with dissolve.
It's exactly as Melkoshi said. If I have five images defined for different characters, and I want to show them all appearing on screen in different positions at once, with a dissolve, all at the same time, I can do:

Code: Select all

  show albert at far_left
  show bernardette at left
  show charles at center
  show derek at right
  show eleanor at far_right
  with dissolve
and Ren'Py will dissolve all five characters into their respective positions simultaneously.

If I want them all to appear in the same spot, one on top of the other, I can do the same thing just with the same position for all characters.

If I want to fade Albert, Bernadette and Charles in at the same time, then far Derek and Eleanor in afterwards, I would instead do:

Code: Select all

  show albert at far_left
  show bernardette at left
  show charles at center
  with dissolve

  show derek at right
  show eleanor at far_right
  with dissolve
Basically, when Ren'Py gets told to show things, it keeps collecting them up and getting them ready to show until it hits a 'with' statement, and then it shows all of the things it has collected up, using the transition in that with statement, all at the same time. Then, once that's finished, it looks for the next thing to do - be it a line of dialogue, another show, whatever.

So, for example:

Code: Select all

  scene ballroom
  show albert at far_left
  show bernardette at left
  with fade
  show charles at center with dissolve
  show derek at right
  show eleanor at far_right
  with dissolve
  p "My, fancy meeting all you people here!"
This will fade to black, then fade back to a new scene in the ballroom, with Albert already at the far left and Bernadette at the left. Once the fade is complete, it will dissolve Charles in at the centre. It will wait for the dissolve to finish, then it will dissolve Derek and Eleanor in at the right at the same time. Once that dissolve is finished, it will finally display the line of dialogue.



Edit:

Alternatively, if by 'stack of images' you mean like dressing a paper doll to create your stacked image to display, then it's not a problem with show/with at all, you just need im.Composite. So:

Code: Select all

init:
  image bernadette dress glasses = im.Composite(
    None,
    (0,0), "bernadette_base.png",
    (0,0), "bernadette_dress.png",
    (0,0), "bernadette_glasses.png"
    )
Then use it like a regular image:

Code: Select all

  show bernadette dress glasses with dissolve
Server error: user 'Jake' not found

JinzouTamashii
Eileen-Class Veteran
Posts: 1686
Joined: Mon Sep 21, 2009 8:03 pm
Projects: E-mail me if you wanna rock the planet
Location: USA
Contact:

Re: How do I show all the layers at once?

#10 Post by JinzouTamashii »

You have clearly answered both parts of my question. I understood perfectly. Thank you very much.

Can I add your examples to the Wiki?
Don't worry, we can get through it together. I didn't forget about you! I just got overwhelmed.
https://cherylitou.wordpress.com

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: How do I show all the layers at once?

#11 Post by Jake »

JinzouTamashii wrote:You have clearly answered both parts of my question. I understood perfectly. Thank you very much.
You're welcome. ;-)
JinzouTamashii wrote:Can I add your examples to the Wiki?
Of course, if there's somewhere you think they'd be useful.
Server error: user 'Jake' not found

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot]