Second splash screen? [Solved]
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.
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.
- Lime-Kiwi
- Newbie
- Posts: 14
- Joined: Fri Apr 12, 2013 10:09 pm
- Completed: Acrimenthums, A Nutcracker Tale, Falling Star, The Pendant Guarden
- Projects: TBD...
- Organization: kipursuit
- Deviantart: utemi
- Github: ollie-jam
- itch: kipursuit
- Location: United States
- Contact:
Second splash screen? [Solved]
Is it possible to have a second splash screen image within the the game or would be better in my case?
I'm trying to add screens that say "Chapter # complete", but using images instead.
I'm trying to add screens that say "Chapter # complete", but using images instead.
Last edited by Lime-Kiwi on Sun Apr 21, 2013 1:34 pm, edited 1 time in total.
Re: Second splash screen?
I don't know about splash screen but I'll show you my approach. I just read about keymap in this link and it says that you can modify list of keys that user can click in order to make something in Ren'Py works. For example: dismissing a Say statement.Lime-Kiwi wrote:I'm trying to add screens that say "Chapter # complete", but using images instead.
Now the "Chapter# complete" can be done with images by declaring the image as bg and show them as scene.
Code: Select all
scene bg yourimage
with dissolve
Code: Select all
$ config.keymap['dismiss'].remove('mouseup_1')
$ config.keymap['dismiss'].remove('K_RETURN')
$ config.keymap['dismiss'].remove('K_SPACE')
$ config.keymap['dismiss'].remove('K_KP_ENTER')
$ config.keymap['dismiss'].remove('joy_dismiss')
We don't want to disable the keys forever, so we want to put them back the next 5 seconds or so. So here's what I do. I record the play time (in second) and then compute it all over again until it reach 5 seconds, all is done while the user can't type/mouse click the scene to advance further.
Code: Select all
$ min_now, sec_now = divmod(int(renpy.get_game_runtime()), 60)
$ flag = True
while flag == True:
$ min_ltr, sec_ltr = divmod(int(renpy.get_game_runtime()), 60)
$ diff = sec_ltr - sec_now
if diff >= 5:
$ flag = False
After that, we append the original keymap back.
Code: Select all
$ config.keymap['dismiss'].append('mouseup_1')
$ config.keymap['dismiss'].append('K_RETURN')
$ config.keymap['dismiss'].append('K_SPACE')
$ config.keymap['dismiss'].append('K_KP_ENTER')
$ config.keymap['dismiss'].append('joy_dismiss')
I'm sorry if I'm too stupid, but I can't learn to walk on my own
Re: Second splash screen?
I'm really sorry. The only way for the above solution to work is if only there's a say statement inside the while function. Else, the game would freeze and "not responding". So here's a little fix
I did have the say statement while testing this code before, but I didn't know if we exclude the say altogether it would mess up the program.
Code: Select all
$ min_now, sec_now = divmod(int(renpy.get_game_runtime()), 60)
$ flag = True
while flag == True:
"say something or anything here"
$ min_ltr, sec_ltr = divmod(int(renpy.get_game_runtime()), 60)
$ diff = sec_ltr - sec_now
if diff >= 5:
$ flag = False
I'm sorry if I'm too stupid, but I can't learn to walk on my own
- Lime-Kiwi
- Newbie
- Posts: 14
- Joined: Fri Apr 12, 2013 10:09 pm
- Completed: Acrimenthums, A Nutcracker Tale, Falling Star, The Pendant Guarden
- Projects: TBD...
- Organization: kipursuit
- Deviantart: utemi
- Github: ollie-jam
- itch: kipursuit
- Location: United States
- Contact:
Re: Second splash screen?
I found another way that seemed a lot easier:
Thank you though!
Code: Select all
scene chpt1
$ renpy.pause(5)
with dissolve
scene black
Re: Second splash screen? [Solved]
Ah, I thought by splash screen you mean an image is shown without being able to be interrupted. So I went and overdid myself but yeah it actually is that simple
I'm sorry if I'm too stupid, but I can't learn to walk on my own
-
- Veteran
- Posts: 356
- Joined: Mon Mar 11, 2013 11:03 pm
- Contact:
Re: Second splash screen? [Solved]
And if you wish, you may stop the user from clicking (other buttons will still work) during the image cutscene with a hard pause.
Code: Select all
play music "transition.ogg" # optional sound effect
scene chpt1 with fade
$ renpy.pause(3, hard=True)
scene bg uni with dissolve
play music "illurock.ogg"
Re: Second splash screen? [Solved]
Oh My God it actually IS that simple lol now i feel like a total newb (which I already am) thank you pwisaguacate for sharing this information
I'm sorry if I'm too stupid, but I can't learn to walk on my own
Who is online
Users browsing this forum: Bing [Bot], Majestic-12 [Bot]