logo replaying, main menu, navigation menu(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
Fluxx
Regular
Posts: 81
Joined: Fri Jan 23, 2015 8:04 pm
Projects: Magnificent//Omniversal Love, Nature's Kingdom
Organization: Natural Freedom
IRC Nick: Fluxx
Tumblr: superfunspacejam
Contact:

logo replaying, main menu, navigation menu(solved)

#1 Post by Fluxx »

Renpy newbie, Just started messing around with the program. Every time I click return on the navigation menu, my logo animation replays. First Logo3 would show for a split second, disappear, and then repeat at scene. Animation would replay completely.

How can I get Logo3 to show on the main menu as soon as return is clicked, without replaying the menu animation?


Code: Select all

label main_menu:
    scene mainmenu with flash
    show logo2 with dissolve:
        truecenter
    $ renpy.pause(.1, hard=True)   
    show logo3 with dissolve:
        truecenter
    
 # The main menu buttons.
    $ ui.vbox(xalign=.98, yalign=.98)
    $ ui.textbutton("Start Game", clicked=ui.returns("start"))
    $ ui.textbutton("Load Game", clicked=ui.returns("load"))
    $ ui.textbutton("Options", clicked=ui.returns("prefs"))
    $ ui.textbutton("Exit", clicked=ui.returns("quit"))
    $ ui.close()
   

    $ result = ui.interact()
   
    if result == "start":
        hide mainmenu
        $ renpy.jump_out_of_context("start")
    elif result == "load":
        jump load_screen
    elif result == "prefs":
        jump preferences_screen
    elif result == "quit":
        $ renpy.quit()  
Navigation

Code: Select all

screen navigation():

    # The background of the game menu.
    window:
        style "gm_root"

    # The various buttons.
    frame:
        style_group "gm_nav"
        xalign .98
        yalign .98

        has vbox

        textbutton _("Return") action Return()
        textbutton _("Options") action ShowMenu("preferences")
        textbutton _("Save Game") action ShowMenu("save")
        textbutton _("Load Game") action ShowMenu("load")
        #textbutton _("Main Menu") action ShowMenu("main_menu")
        #textbutton _("Help") action Help()
        textbutton _("Quit") action Quit()

init -2:

    # Make all game menu navigation buttons the same size.
    style gm_nav_button:
        size_group "gm_nav"

Last edited by Fluxx on Wed Mar 25, 2015 3:36 pm, edited 1 time in total.
CURRENT PROJECTS (Ongoing)
Image
Nature's Kingdom - A Girl Wishes for Utopia -
Web Novel that takes place in the same universe as Magnificent//Omniversal Love.

User avatar
Arowana
Miko-Class Veteran
Posts: 531
Joined: Thu May 31, 2012 11:17 pm
Completed: a2 ~a due~
Projects: AXIOM.01, The Pirate Mermaid
Organization: Variable X, Navigame
Tumblr: navigame-media
itch: navigame
Contact:

Re: logo replaying, main menu, navigation menu

#2 Post by Arowana »

Do you only want the animation to play when you first open the game? Then you might be better off putting it under the splashscreen label instead.

See here for example:
http://lemmasoft.renai.us/forums/viewto ... 16#p313426
Complete: a2 ~a due~ (music, language, love)
In progress: The Pirate Mermaid (fairytale otome)
On hold: AXIOM.01 (girl detective game)

Image

User avatar
Fluxx
Regular
Posts: 81
Joined: Fri Jan 23, 2015 8:04 pm
Projects: Magnificent//Omniversal Love, Nature's Kingdom
Organization: Natural Freedom
IRC Nick: Fluxx
Tumblr: superfunspacejam
Contact:

Re: logo replaying, main menu, navigation menu(solved)

#3 Post by Fluxx »

I was already using splashscreen for my prologue so I just made a new label instead. Thanks Arowana :)

Code: Select all

    #We've reached the end of the prologue"
    # Let's save that fact
    $ persistent.seenprologue = True
    $ _game_menu_screen = "_save_screen"

    jump logoanimation

label logoanimation:
    scene mainmenu with flash
    play music "Into the Night.mp3" fadein 0.1
    show logo2 with dissolve:
        truecenter
    $ renpy.pause(.1, hard=True)
    show logo3 with Dissolve(2, alpha=True, time_warp=None):
        truecenter
    return
   
#goes to main menu
label main_menu:
    scene mainmenu
    show logo3:
        truecenter
CURRENT PROJECTS (Ongoing)
Image
Nature's Kingdom - A Girl Wishes for Utopia -
Web Novel that takes place in the same universe as Magnificent//Omniversal Love.

Post Reply

Who is online

Users browsing this forum: Google [Bot]