Skip Button for Splashscreen [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
Syphe
Newbie
Posts: 6
Joined: Mon Jul 29, 2013 4:51 am
Projects: Medieval Jump, Night Jump
Tumblr: jumpvolumes
Contact:

Skip Button for Splashscreen [SOLVED]

#1 Post by Syphe »

Hi, I'm Sy!

You see, I have a very long splashscreen (around 12 seconds), and I thought it'd be good to have a Skip button.
My problem is I kept getting an "end of line expected" error.
There's probably a simple enough solution that I can't wrap my head around yet, I'm sure...

Anyway, here is my code in script.rpy

Code: Select all

label splashscreen:
    
    textbutton "Skip" action return align(.95, .95)

    scene black
    
    play sound "sfx/Underwater Bubbles Sound.mp3"
    play music "music/Splash.mp3"
    
    show logo with dissolve:
        xalign 0.5 yalign 0.5
        
    # ...The rest are too long and unnecessary to paste 
    
    return
And I received this error.
File "game/script.rpy", line 90: end of line expected.
textbutton "Skip" ->action return align(.95, .95)

Then I thought I needed to add indentations, so I tried this

Code: Select all

label splashscreen:
    
    textbutton "Skip":
        action return
        align(.95, .95)
        
    scene black
    
    play sound "sfx/Underwater Bubbles Sound.mp3"
    play music "music/Splash.mp3"
    
    show logo with dissolve:
        xalign 0.5 yalign 0.5
        
    # ...The rest are too long and unnecessary to paste 
    
    return
But the error still persists
File "game/script.rpy", line 90: end of line expected.
textbutton "Skip" ->:
I don't quite understand what "end of line expected" actually means, I thought it just wants me to place each text on a separate line.
I also attempted to remove the ":" after the textbutton "Skip" line but the "preceding say statement doesn't expect a block", whatever that means.

Any help is appreciated, thank you!
Last edited by Syphe on Sat Nov 03, 2018 4:54 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: Skip Button for Splashscreen

#2 Post by IrinaLazareva »

Code: Select all

screen skipscreen():
    textbutton "Skip" align(.95, .95) action MainMenu(False)

label splashscreen:
    scene black
    show screen skipscreen
    'Loooooooooooong beginnnnnning, but you can skip this{w=200}{nw}'
    '.......'
    hide screen skipscreen
    'Loooooooooooong beginnnnnning, and now you can not skip this{w=200}{nw}'
    return
https://renpy.org/doc/html/screens.html
https://renpy.org/doc/html/screen_actions.html#MainMenu

User avatar
Syphe
Newbie
Posts: 6
Joined: Mon Jul 29, 2013 4:51 am
Projects: Medieval Jump, Night Jump
Tumblr: jumpvolumes
Contact:

Re: Skip Button for Splashscreen

#3 Post by Syphe »

I see! You have to make a screen for it and call it in the label...!
The docs are extremely helpful as well, thank you so much!
IrinaLazareva wrote: Sat Nov 03, 2018 3:18 am

Code: Select all

screen skipscreen():
    textbutton "Skip" align(.95, .95) action MainMenu(False)

label splashscreen:
    scene black
    show screen skipscreen
    'Loooooooooooong beginnnnnning, but you can skip this{w=200}{nw}'
    '.......'
    hide screen skipscreen
    'Loooooooooooong beginnnnnning, and now you can not skip this{w=200}{nw}'
    return
https://renpy.org/doc/html/screens.html
https://renpy.org/doc/html/screen_actions.html#MainMenu

Post Reply

Who is online

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