Page 1 of 1

[SOLVED] Hide textbox within function

Posted: Mon Aug 24, 2020 12:07 pm
by Bren
Hi there,

I'm currently working on a very simple VN, and despite this, there are still a few things that appear to be a bit too hard for me...

Very basic question here: I want to zoom on specific parts of a given background for a few seconds, then resume the game with the normal-sized background. So far so good, but I can't find a way to hide the textbox during this process.

Code: Select all

image bg animated: 

    Solid("#000")

    zoom 2.0
    im.Scale("bg/room_day.png", 1280, 720)
    xalign 0.1 yalign 0.3
    pause 1.5
    Solid("#000")
    
    im.Scale("bg/room_day.png", 1280, 720) with dissolve
    xalign 0.6 yalign 0.3
    pause 1.5
    Solid("#000")
    
    zoom 1.0
    im.Scale("bg/room_day.png", 1280, 720) with dissolve
I've tried to use the command "window hide", but it doesn't seem to work within the image function. Does anyone know how to make this work?
Additional question: is there a way to add a variable to the image function so I can change the background anytime I call the function?

Many thanks!

Re: Hide textbox within function

Posted: Thu Jul 08, 2021 7:34 am
by Bren
Hey guys,

For those who would be interested, I kind of found a (messy) way to hide textbox for a few seconds while calling the function - to be put directly in your script where you want to textbox to be hidden:

Code: Select all

    $ preferences.skip_after_choices = False
    $ renpy.choice_for_skipping()
    $ _skipping = False
    $ quick_menu = False
    $ preferences.afm_enable = False
    show "CG/CG1.png"
    hide "CG/CG1.png"
    scene bg animated
    $ renpy.pause(6.0, hard=True)
    $ _skipping = True
    $ quick_menu = True
    $ preferences.skip_after_choices = True
I'm sure there's a better way to do this but at least it works. Hope this helps!