[SOLVED]Why is a particular sprite disappearing while using Skip?

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
GammaBreak
Regular
Posts: 62
Joined: Thu Aug 06, 2020 10:04 pm
Contact:

[SOLVED]Why is a particular sprite disappearing while using Skip?

#1 Post by GammaBreak » Thu Dec 31, 2020 6:22 pm

I have a random sprite that disappears if you use the Skip feature in Renpy (holding Ctrl) and I'm scratching my head as to why it doesn't display. It works absolutely fine if you step through it at human speeds, or even mashing the mouse button as fast as possible. But as soon as you use Skip, this problem happens.

This is actually something I asked about a few months ago, and here is the desired effect I am trying to produce:

1. The player turns around and sees a new character standing very close. This is done with hallwaychar, which is the same as my hallway background, just the character image embedded in it and in reverse.
2. hallway is shown in reverse (remember, character turned around), and the character sprite is shown zoomed in. This effectively recreates hallwaychar as a scene and a sprite, not just a scene.
3. Some zoom/panning is done to zoom the sprite back to normal (the player steps backwards).
4. Some more zooming/panning as the player looks at the character.
5. Return to normal zoom, move the character to the right, and a new character slides in from the left.

I use this process to make the character appear instantly in the wiperight transition. No pause or break between loading the scene and the character sprite.

Using Skip results in the sprite that is supposed to load at the first show char normal at center: to become invisible. I've checked with Renpy's tools, and it's being picked up in the Image Attributes. There are no crashes, meaning all the calls/transforms are working.

Character 2 always loads in and appears as normal.

Furthermore, I use pretty much this exact same trick again later in the game and it works fine. The only thing I don't do is use the mirrored background trick, so I'm wondering if somehow the scene is getting loaded over the sprite?

Code below

Code: Select all

scene hallwaychar with wiperight   #Reverse background with zoomed character
        pause 1.5
        p "dialogue 1"
        window hide
        scene hallway:  #show reverse background
            xzoom -1.0
            xalign 0.5
        show char normal at center:  #show zoomed character ~about the same as hallwaychar background
            zoom 2.86
            ypos 2.045
        pause 1.0
        show char normal:  #Zoom character out to normal
            zoom 2.86
            ypos 2.045
            subpixel True
            linear 1.0 zoom 1.0 ypos 1.0
        n "dialogue 2"
        window hide
        show char normal with dissolve:  #Zoom/pan over sprite
            zoom 2.00
            ypos 1.0
            pause 0.5
            subpixel True
            linear 5.0 ypos 2.0
        pause 5.0
        n "dialogue 3"
        n "dialogue 4"
        window hide
        pause 0.5
        show char normal:  #Additional pan/zoom
            ypos 2.0
            zoom 2.00
            subpixel True
            linear 4.0 ypos 1.8 zoom 2.5
        pause 2.1
        play sound sound
        pause 1.0
        show char newface:
            ypos 1.8
            zoom 2.5
            subpixel True
            linear 0.5 zoom 1.0 ypos 1.0
        q "dialogue 5"
        n "dialogue 6"
        n "dialogue 7"
        p "dialogue 8"
        show char newface:  #Move character over
            subpixel True
            linear 0.5 xpos 0.70
        show char 2 happy at left:  #Move new character in
            xpos -0.50
            subpixel True
            linear 1.0 xpos 0.05
Last edited by GammaBreak on Fri Jan 01, 2021 12:32 pm, edited 1 time in total.

emanuel
Newbie
Posts: 12
Joined: Fri Dec 25, 2020 8:44 am
Contact:

Re: Why is a particular sprite disappearing while using Skip?

#2 Post by emanuel » Fri Jan 01, 2021 6:24 am

I've had a similar issue. I don't know exactly how it is caused, but I solved it by replacing the pause statement, with a $renpy.pause(1.0) call. I assume it has something to do with the pause statement actually resolving to a Pause transition which is completely skipped when using skip. The next image then isn't skipped because it is part of the scene when there is dialogue. So in your case that would be the pause after show char normal at center

GammaBreak
Regular
Posts: 62
Joined: Thu Aug 06, 2020 10:04 pm
Contact:

Re: Why is a particular sprite disappearing while using Skip?

#3 Post by GammaBreak » Fri Jan 01, 2021 12:32 pm

Yep, that was definitely it. Thanks!

Post Reply

Who is online

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