Background disappears after "Show"

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
shanks
Newbie
Posts: 13
Joined: Mon Oct 06, 2014 7:56 pm
Projects: My Winter Poly, The Piggy Bank Robber, This is not a dating game
Tumblr: milkiverse
Deviantart: milkiverse
Contact:

Background disappears after "Show"

#1 Post by shanks »

Good afternoon, all!

I've been meaning to join this forum for a while. Figures I finally get off my butt and do it when I encounter an issue I just can't solve. orz

This is the code I have for this particular label:

Code: Select all

$ where = 0
    
    scene ren house with fade
    "Ren's House - 8:15PM"
    "It's getting dark. His parents might be home by now..."
    play sound "doorbell.wav"
    pause 2
    rmom "Ren! Get the door!"
    pause 2
    play sound "door.wav"
    show ren with fade
    R "Oh, it's you."
When I test this out, the "scene ren house" actually disappears once it reaches the "show ren with fade" action. When I cut out "show ren", then the background stays. I'm supremely confused, because I've done this several times throughout the script and never encountered this problem! ;n; I even switched the image file with an image I use frequently throughout the game and the same thing happens. The screen size is 800 x 600 and ALL of my backgrounds are 800 x 600.

Any help would be appreciated!

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Background disappears after "Show"

#2 Post by Donmai »

The problem is in the way you named your files. Ren'Py is treating "ren" as a name tag. By default, an image will always overwrite another image that has the same name tag.
http://www.renpy.org/doc/html/displayin ... html#image
Since name tags are very useful in sprite names (so you never need to hide a sprite, only show another with the same tag), try renaming your background image to something like "ren_house" and see if it works.
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Background disappears after "Show"

#3 Post by Donmai »

The problem is in the way you named your files. Ren'Py is treating "ren" as a name tag. By default, an image will always overwrite another image that has the same name tag.
http://www.renpy.org/doc/html/displayin ... html#image
Since name tags are very useful in sprite names (so you never need to hide a sprite, only show another with the same tag), try renaming your background image to something like "ren_house" and see if it works.
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

User avatar
shanks
Newbie
Posts: 13
Joined: Mon Oct 06, 2014 7:56 pm
Projects: My Winter Poly, The Piggy Bank Robber, This is not a dating game
Tumblr: milkiverse
Deviantart: milkiverse
Contact:

Re: Background disappears after "Show"

#4 Post by shanks »

Thank you soooo much Donmai! It worked! : D

I didn't even consider that could be a possibility. I have so much left to learn. orz That explains a few other things that were happening too. Thanks again!

Post Reply

Who is online

Users browsing this forum: Ocelot