Main Menu Background
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.
Main Menu Background
I've been configuring the main menu and setting things recently and wondered whether it's at all possible to have a slide show playing as the background of the main menu? I don't know whether this could be achieved with a splashscreen or something. I'm using renpy and jedit.
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Main Menu Background
It's actually pretty easy for a two step process. First, set up a slideshow using an ATL image:
Then, set the background to be the slideshow image.
Code: Select all
image slideshow:
"image1.jpg" with dissolve
pause 3.0
"image2.jpg" with dissolve
pause 3.0
"image3.jpg" with dissolve
pause 3.0
repeat
Code: Select all
init python:
style.mm_root.background = "slideshow"
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Re: Main Menu Background
I get an error regarding the repeat function:
Any ideas?I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
On line 62 of expected statement.
repeat
^
Ren'Py Version: Ren'Py 6.11.2b
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Main Menu Background
It seems like you didn't indent repeat properly. Can you post your script?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Re: Main Menu Background
On my script:
Then on my options:
As well as the slideshow, I've used an image map png so that the slideshow can be seen behind it (hopefully):
Code: Select all
image slideshow:
"splash2.jpg" with dissolve
pause 3.0
"splash3.jpg" with dissolve
pause 3.0
"splash4.jpg" with dissolve
pause 3.0
repeat
Code: Select all
style.mm_root.background = "slideshow"
Code: Select all
init -2 python:
layout.imagemap_main_menu("menutransmain.png", "menutrans.png", [
(417, 210, 541 ,240, "Start Game"),
(417, 247, 543, 269, "Load Game"),
(420, 282, 542, 307, "Preferences"),
(455, 354, 507, 383, "Quit"),
(455, 317, 507, 346, "Help"),
])
Re: Main Menu Background
Any suggestions how this can be achieved or what's going wrong? Whether I'm pasting it in the wrong place?
-
- Regular
- Posts: 67
- Joined: Wed Jul 30, 2008 11:43 am
- Projects: Wanderer
- Location: USA
- Contact:
Re: Main Menu Background
Is the first block of code you posted in your last post indented the way it is there? If so, you might have to drop the first line back four spaces for it to work properly. Python (and by extension Renpy) is very dependent on whitespace use, so that can muck things up if you're not careful.
Who is online
Users browsing this forum: Anastimafilia