Page 1 of 1

Main Menu Background

Posted: Sat Jan 22, 2011 2:45 pm
by clannadman
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.

Re: Main Menu Background

Posted: Sat Jan 22, 2011 2:51 pm
by PyTom
It's actually pretty easy for a two step process. First, set up a slideshow using an ATL 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
Then, set the background to be the slideshow image.

Code: Select all

init python:
    style.mm_root.background = "slideshow"

Re: Main Menu Background

Posted: Sat Jan 22, 2011 3:13 pm
by clannadman
I get an error regarding the repeat function:
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
Any ideas?

Re: Main Menu Background

Posted: Sat Jan 22, 2011 3:16 pm
by PyTom
It seems like you didn't indent repeat properly. Can you post your script?

Re: Main Menu Background

Posted: Sat Jan 22, 2011 3:20 pm
by clannadman
On my script:

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
Then on my options:

Code: Select all

style.mm_root.background = "slideshow"
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

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

Posted: Sun Jan 23, 2011 5:38 pm
by clannadman
Any suggestions how this can be achieved or what's going wrong? Whether I'm pasting it in the wrong place?

Re: Main Menu Background

Posted: Mon Jan 24, 2011 12:40 am
by Verity
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.