Screen Tags

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
QotC
Regular
Posts: 54
Joined: Thu Feb 17, 2011 8:53 pm
Contact:

Screen Tags

#1 Post by QotC »

What am I doing wrong? The manual says that showing a screen will replace another screen with the same tag, which is what I want; but when I run my code, both screens are showing simultaneously.

Code: Select all

screen choosePartyScreen:
        tag pineapple
        vbox xalign 0.0:
            text"Party Members: %d" % partyMembers
            null height 10
            hbox:
                text player['Name']
                null width 5
                textbutton "Edit" action Jump('edit_party_member')
            if partyMembers > 1:
                hbox:
                    #text somebodysName
                    textbutton "Remove"
            if partyMembers < maxPartyMembers:
                textbutton "Add Party Member"
        textbutton "Quit" action Jump('end_game') xalign 0.0 yalign 1.0
    
label choose_party:
    show screen choosePartyScreen
    $ui.interact()

screen editPartyMemberScreen:
    tag pineapple
    vbox:
        text "Name: "
        textbutton "Done" action Jump('choose_party')

label edit_party_member:
    show screen editPartyMemberScreen
    python:    
        ui.interact()


Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: Screen Tags

#2 Post by Asceai »

I just tested your code and it doesn't happen for me (only one screen is shown at a time). Need more context.

QotC
Regular
Posts: 54
Joined: Thu Feb 17, 2011 8:53 pm
Contact:

Re: Screen Tags

#3 Post by QotC »

I can only assume it's my computer glitching, then. Script-wise, that's 98% of all I had coded when I had the problem There was also:

Code: Select all

label start:

    jump choose_party

    return
And two uncalled place-holding labels elsewhere. The only other context I can add is that I'm using the latest version of Renpy on Windows 7.

Anyway, since my last post, I added explicit Hide commands so I could continue coding. When I finally took them out again, it started working right, as you said. So, the good news is, it's working now; but the bad news is, I still have no idea what happened or why, or if it will happen again. :(

Post Reply

Who is online

Users browsing this forum: Google [Bot]