Extend "" and transform not working with replay

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
K0torisan
Regular
Posts: 26
Joined: Fri Feb 16, 2018 10:21 pm
Contact:

Extend "" and transform not working with replay

#1 Post by K0torisan »

Hello! I'm quite puzzled over this issue, and I'd love if someone could help me.

On the menus of my game, I use extend "" to keep the text box in place while a user makes a choice. After the player makes a choice, I have a call set up that shows the player if they've made a good/bad choice. The intended effect is that the text box stays in place during the little animation. During regular play (if you started a new game or loaded a game), everything works fine.

Here is the code I have set up for a menu:

Code: Select all

menu:
    extend ""
    "I'm busy.":
        play sound "sfx/button.mp3"
        $ max_affection +=10
        $ max_affection_action = "up"
        call max_affection_animation
Like I said, this works for regular play, but for some reason, when the player is replaying a scene that they've already seen [via Replay("label")], instead of the text box staying in place during the animation, the text box fades away until the animation is complete, then reappears.

Not sure if this will help, but here is the code for the corresponding call statement:

Code: Select all

label max_affection_animation:
    if max_affection_action == "up":
        show max_affection_base:
            xalign 0.29 yalign .74
        show affection_arrow:
            xalign .29 yalign .74
            linear 1.0 xalign .33
        with dissolve
        hide max_affection_base
        hide affection_arrow
        with dissolve
    elif max_affection_action == "down":
        show max_affection_base:
            xalign 0.29 yalign .74
        show affection_arrow:
            xalign .33 yalign .74
            linear 1.0 xalign .29
        with dissolve
        hide max_affection_base
        hide affection_arrow
        with dissolve
    return
Like I said, I'm puzzled. This doesn't hider play, it's just a cosmetic thing that is bothering me. Also, I hope I described everything clearly. Any help would be appreciated!

philat
Eileen-Class Veteran
Posts: 1909
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Extend "" and transform not working with replay

#2 Post by philat »

Probably not an issue with extend. Transitions hide the window by default. Try using window show or something along those lines. https://www.renpy.org/doc/html/dialogue ... management

Post Reply

Who is online

Users browsing this forum: Google [Bot]