Trouble with navigation between screens (Solved)

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
cloudypie
Newbie
Posts: 18
Joined: Tue Jun 14, 2016 7:23 pm
Projects: Moonlight drizzle
Location: México
Contact:

Trouble with navigation between screens (Solved)

#1 Post by cloudypie » Tue Jun 14, 2016 7:37 pm

Hello! I'm really new to renpy and I've been having trouble with the return button between screens. I am coding a simple demo and in the menu I want it to navigate between screens so the player can see the character descriptions in a completely new screen and return to the previous one, but every time I try to make the return button or the Main Menu button work it doesn. I'm really clueless in what I'm doing wrong and I apologize if it's a really simple mistake:

Code: Select all

screen character_route:    #Add code
    window:
        add "selectroute.jpg"
                
        style "mm_root"
        frame:
            style_group "gm_nav"
            xalign .98
            yalign .98

            has vbox
            textbutton _("Kazuo") action ShowMenu("Kazuo")activate_sound "click1.mp3"
            textbutton _("Hakai") action ShowMenu("Hakai")activate_sound "click1.mp3"
            textbutton _("Naoyuki") action ShowMenu("Naoyuki")activate_sound "click1.mp3"
            textbutton _("Back") action Return()
            textbutton _("Quit") action Quit()
        
screen Kazuo:    #Add code
    window:
        add "kazp.png"
        
        style "mm_root"
        frame:
            style_group "gm_nav"
            xalign .98
            yalign .98

            has vbox
    
            textbutton _("Back") action Return()
            textbutton _("Quit") action Quit()
screen Hakai:    #Add code
    window:
        add "hakp.png"
        
        style "mm_root"
        frame:
            style_group "gm_nav"
            xalign .98
            yalign .98

            has vbox
    
            textbutton _("Back") action Return()
            textbutton _("Quit") action Quit()

screen Naoyuki:    #Add code
    window:
        add "naop.png"
        
        style "mm_root"
        frame:
            style_group "gm_nav"
            xalign .98
            yalign .98

            has vbox
    
            textbutton _("Back") action Return()
            textbutton _("Quit") action Quit()
Last edited by cloudypie on Thu Jun 16, 2016 12:48 am, edited 1 time in total.

User avatar
IrinaLazareva
Veteran
Posts: 399
Joined: Wed Jun 08, 2016 1:49 pm
Projects: Legacy
Organization: SunShI
Location: St.Petersburg, Russia
Contact:

Re: Trouble with navigation between screens

#2 Post by IrinaLazareva » Tue Jun 14, 2016 9:46 pm

in screen character_route change:

Code: Select all

textbutton _("Back") action Return()
to

Code: Select all

textbutton _("Back") action Hide("character_route")
in screen Kazuo:

to

Code: Select all

textbutton _("Back") action Hide("Kazuo")
etc.

User avatar
cloudypie
Newbie
Posts: 18
Joined: Tue Jun 14, 2016 7:23 pm
Projects: Moonlight drizzle
Location: México
Contact:

Re: Trouble with navigation between screens

#3 Post by cloudypie » Thu Jun 16, 2016 12:48 am

Thanks a lot for your reply! It was really helpful now it works! :)

Post Reply

Who is online

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