Create two splash screens

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
Vib Tardius
Newbie
Posts: 4
Joined: Sun Aug 09, 2020 7:15 pm
Github: vibtardius
Contact:

Create two splash screens

#1 Post by Vib Tardius »

Hello, I would like to start my game with two splash screens. For example, one saying "this game is under a XXX license". And the second one saying "Special thanks to XXX".

(...)

I've searched where is the "skip the splashscreen" option, but I didn't find it.
Thank you for your help.

Edit :
Sorry, I confused splashscreen one and two in my original post.
Here is the corrected version :

My code :

Code: Select all

# The "splashscreen" label automatically plays before the main menu. 
label splashscreen :
    scene black_screen
    show splashscreen1 with dissolve
    pause 12.0
    hide splashscreen1 with dissolve
    show splashscreen2 with dissolve
    pause 6.0
    hide splashscreen2 with dissolve
    return
Expected result :

When the player clicks while splashscreen1 is displayed, it skips the "pause 12.0" and shows splashscreen2.

Result :

When the player clicks while splashscreen1 is displayed, it skips the rest of the splashscreen and goes to the main menu.
Last edited by Vib Tardius on Mon Aug 10, 2020 4:22 pm, edited 2 times in total.

MisterHarold
Regular
Posts: 51
Joined: Tue Jul 17, 2018 10:32 am
Location: Philippines
Contact:

Re: Create two splash screens

#2 Post by MisterHarold »

try this

Code: Select all

label splashscreen :
    scene black_screen
    show splashscreen2 with dissolve
    pause 6.0
    hide splashscreen2 with dissolve
    return #remove this if it doesn't work
label splashscreen2:    
    show splashscreen1 with dissolve
    pause 12.0
    hide splashscreen1 with dissolve
    return

User avatar
hell_oh_world
Miko-Class Veteran
Posts: 777
Joined: Fri Jul 12, 2019 5:21 am
Contact:

Re: Create two splash screens

#3 Post by hell_oh_world »

I'm not sure if I understand but you said...
When the player clicks while splashscreen1 is displayed, it skips the rest of the splashscreen and goes to the main menu.
well... it will definitely because the placement of your splashscreen images says it well. you first showed the splashscreen 2 then the splashscreen 1 appears, so it's expected that if you'll click while the splashscreen 1 is showing to go to the main menu since there are no codes left below the splashscreen 1 if that makes sense.

so it should be something like...

Code: Select all

label splashscreen:
  scene black
  show splashscreen_image_1 with dissolve
  pause 5.0
  hide splashscreen_image_1 with dissolve

  show splashscreen_image_2 with dissolve
  pause 5.0
  hide splashscreen_image_2 with dissolve

  return
if the splashscreens have pattern like they just all dissolve then probably create a helper label and call it, so you can reuse and reuse it if you have more things to show while in splashscreen...

Code: Select all

label splashscreen:
  scene black
  call splashscreen_generator("splashscreen1", 5.0)
  call splashscreen_generator("splashscreen2", 7.0)

  return
  
label splashscreen_generator(the_image, duration=5.0):
  show expression the_image
  pause 5.0
  hide expression the_image
  return

Vib Tardius
Newbie
Posts: 4
Joined: Sun Aug 09, 2020 7:15 pm
Github: vibtardius
Contact:

Re: Create two splash screens

#4 Post by Vib Tardius »

Sorry, I confused splashscreen1 and splashscreen2 in my original post (see my edit).

I tried your solutions but I still have the same problem : when the player clicks while the first splashscreen is displayed, it skips the second splashscreen.
if the splashscreens have pattern like they just all dissolve then probably create a helper label and call it
Thanks, it will improve my code.

Vib Tardius
Newbie
Posts: 4
Joined: Sun Aug 09, 2020 7:15 pm
Github: vibtardius
Contact:

Re: Create two splash screens

#5 Post by Vib Tardius »

As a temporary solution, I may put splashscreen1 before the main menu (after "label splashscreen") and splashscreen2 after starting a new game (after "label start").

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

Re: Create two splash screens

#6 Post by IrinaLazareva »

Vib Tardius wrote: Sun Aug 09, 2020 7:29 pm My code :

Code: Select all

# The "splashscreen" label automatically plays before the main menu. 
label splashscreen :
    scene black_screen
    show splashscreen1 with dissolve
    pause 12.0
    hide splashscreen1 with dissolve
    show splashscreen2 with dissolve
    pause 6.0
    hide splashscreen2 with dissolve
    return
Expected result :

When the player clicks while splashscreen1 is displayed, it skips the "pause 12.0" and shows splashscreen2.
use $ renpy.pause() instead of pause

Code: Select all

# The "splashscreen" label automatically plays before the main menu. 
label splashscreen :
    scene black_screen
    show splashscreen1 with dissolve
    $ renpy.pause(12.0)
    hide splashscreen1 with dissolve
    show splashscreen2 with dissolve
    $ renpy.pause(6.0)
    hide splashscreen2 with dissolve
    return
https://www.renpy.org/doc/html/other.html#renpy.pause

Vib Tardius
Newbie
Posts: 4
Joined: Sun Aug 09, 2020 7:15 pm
Github: vibtardius
Contact:

Re: Create two splash screens

#7 Post by Vib Tardius »

IrinaLazareva wrote: Thu Aug 13, 2020 9:21 am
use $ renpy.pause() instead of pause

Code: Select all

# The "splashscreen" label automatically plays before the main menu. 
label splashscreen :
    scene black_screen
    show splashscreen1 with dissolve
    $ renpy.pause(12.0)
    hide splashscreen1 with dissolve
    show splashscreen2 with dissolve
    $ renpy.pause(6.0)
    hide splashscreen2 with dissolve
    return
https://www.renpy.org/doc/html/other.html#renpy.pause
Thank you for your answer ! It worked :), and sorry for taking so much time to answer.

Post Reply

Who is online

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