HELP! Background images not displaying even after a scene statement?

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
dramaticaluniweeb
Newbie
Posts: 15
Joined: Sun Jun 12, 2016 1:28 am
Contact:

HELP! Background images not displaying even after a scene statement?

#1 Post by dramaticaluniweeb »

So i have this little chunk of code here:

Code: Select all

label yukiscene:
    
    scene yuki room with Dissolve(2.0)
    
    "After a long, tedious walk and a less-than-pleasant encounter with a stray dog, we finally end up in Yuki's house."
    
    "It's a tidy little place.  Most of the house, in fact, looks entirely undisturbed."
    
    "Even the dishes are stored away as if they've never been touched.  Looking closer, there seems to be dust gathering on the front side of the dish cabinets."
    
    "Weird."
    
    show yuki neutral with Dissolve(0.3)
    
    y "So! Would you like something to drink?"
And every image is defined correctly. The background image displays fine until "yuki neutral", a transparent character sprite, is called. Then it becomes a dark checkered background even though this happens nowhere else in the game.

I had nearly identical code earlier, for example, with the same sprite and all:


Here:

Code: Select all

scene classroom with Dissolve(0.65)
    
    "A final, resounding bell tells me that my doom is impending and my fate is coming to an end."
    
    "I close my math textbook with a thud and shove it as far into my bag as it'll go."
    
    "Man, I've had this backpack since I was a baby...it really has held up."
    
    "Wish I had someone to pass it on to after I die in an hour or two."
    
    u "Hey, [player_name]! Why so down, huh?"
    
    "I look up and am immediately greeted with a glittering smile and a fluffy pink bow."
    
    show yuki neutral with Dissolve(0.5):
        xpos 0
        ypos 0
The only difference is that I didn't use the xpos ypos function on the first chunk. However, when I added the xpos 0 ypos 0 function to it just to see what would happen, the sprite completely disappeared.
What is HAPPENING and can someone PLEASE help me out????

(PS: I thought it was an issue of "too many scene statements, not enough labels", since I had two scene statements in one label. I was very wrong, though, as the png background still just shows up and now I have more labels. Great. -_-)

dramaticaluniweeb
Newbie
Posts: 15
Joined: Sun Jun 12, 2016 1:28 am
Contact:

Re: HELP! Background images not displaying even after a scene statement?

#2 Post by dramaticaluniweeb »

UPDATE:

I discovered the solution myself.

I DID need the xpos ypos. I discovered this by copying a chunk of working code (which had xpos ypos) and testing out different things to see what would happen.

The problem was (i think) the name I used.

Originally, I had the background name saved as yuki room, which has the same prefix as the sprite yuki neutral. This tricked renpy into thinking that they were meant to be swapped out, so that's what it did. I changed the name to yukisroom instead and PRESTO! It worked like a charm.

I'll leave this up in case anyone else was having this problem as well, but now I just feel dumb. ;-;

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], Rhapsy