HideInterface() exceptions - is it possible?

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
barsunduk
Newbie
Posts: 12
Joined: Fri Jul 18, 2014 1:06 pm
Contact:

HideInterface() exceptions - is it possible?

#1 Post by barsunduk » Tue Jul 29, 2014 8:10 pm

i'm trying to make a screen with an easter eggs (to view secret stories. and some items to collect it). it can located behind the text window. i want to hide a text box by click out of text box. action HideInterface(). but my easter_eggs screen hiding too. and it's sad. i'm using Show()/Hide(). but if i hiding say screen two times i can see error message "NameError: name 'who' is not defined".

is there any way to hide all screens except one?

Code: Select all

init -999:
    $ say_visible = True

init:
    screen text_area:
        zorder 1
        mousearea:
            area (0, yy, config.screen_width, config.screen_height - yy)
            hovered Hide("nodismiss")
            unhovered Show("nodismiss")
            
    screen easter_eggs:
        zorder -1
        textbutton ("click me!\ni'm bonus!") action Hide("easter_eggs") align (0.0, 1.0)

    screen nodismiss:
        zorder 0
        if say_visible == True:
            key "mouseup_1" action [Hide("say"), SetVariable("say_visible", False), SetVariable("yy", 450)]
        else:
            key "mouseup_1" action [Show("say"), SetVariable("say_visible", True), SetVariable("yy", 0)]

label start:
    $ yy = 450
    
    show screen nodismiss
    show screen text_area
    show screen easter_eggs
    
    "text1\ntext1\ntext1\ntext1"
    "text2\ntext2\ntext2\ntext2"    
    return

Post Reply

Who is online

Users browsing this forum: No registered users