Page 1 of 1

Main Menu ATL help

Posted: Fri Aug 21, 2015 3:36 pm
by Tagumonman55
So... I have this picture for my title screen, and There's a flower, thats supposed to be dripping blood from one of the petals. I already drew all the images. but now I have to code them into Renpy

I put this in my screens

Code: Select all

##############################################################################
# Main Menu
#
# Screen that's used to display the main menu, when Ren'Py first starts
# http://www.renpy.org/doc/html/screen_special.html#main-menu

screen main_menu():
     image titleimage:
        add "images/QP1.jpg"
        pause 0.1
        add "images/QP2.jpg"
        pause 0.1
        add "images/QP3.jpg"
        pause 0.1
        add "images/QP4.jpg"
        pause 0.1
        add "images/QP5.jpg"
        pause 0.1
        add "images/QP6.jpg"
        pause 0.1
        add "images/QP7.jpg"
        pause 0.1
        add "images/QP8.jpg"
        pause 0.1
        repeat

    # This ensures that any other menu screen is replaced.
    tag menu

    # The background of the main menu.
    window:
        style "mm_root"
        use titleimage()
and my mm_root is set to #000000, but all I get is a black screen, how do i see the animation....

Re: Main Menu ATL help

Posted: Fri Aug 21, 2015 3:45 pm
by mobychan
You only define your image, but don't add it to the screen, try adding it with

Code: Select all

add titleimage

Re: Main Menu ATL help

Posted: Fri Aug 21, 2015 3:51 pm
by xela

Code: Select all

add "titleimage"
is a better bet. Also images should not be declared in screens...

Re: Main Menu ATL help

Posted: Fri Aug 21, 2015 3:56 pm
by Tagumonman55
mobychan wrote:You only define your image, but don't add it to the screen, try adding it with

Code: Select all

add titleimage
Where do I add that? I tried in Tag, Above where I defined it, and below MM root, but I still get a black screen... I'm not sure If MM root is hiding it or not, as MM root shows a black screen. I feel like I'm overlooking something simple.

Re: Main Menu ATL help

Posted: Fri Aug 21, 2015 3:59 pm
by xela

Code: Select all

image titleimage:
    add "images/QP1.jpg"
    pause 0.1
    add "images/QP2.jpg"
    pause 0.1
    add "images/QP3.jpg"
    pause 0.1
    add "images/QP4.jpg"
    pause 0.1
    add "images/QP5.jpg"
    pause 0.1
    add "images/QP6.jpg"
    pause 0.1
    add "images/QP7.jpg"
    pause 0.1
    add "images/QP8.jpg"
    pause 0.1
    repeat


screen main_menu():
    # This ensures that any other menu screen is replaced.
    tag menu

    # The background of the main menu.
    add "titleimage"

Re: Main Menu ATL help

Posted: Fri Aug 21, 2015 4:07 pm
by Tagumonman55
xela wrote:

Code: Select all

image titleimage:
    add "images/QP1.jpg"
    pause 0.1
    add "images/QP2.jpg"
    pause 0.1
    add "images/QP3.jpg"
    pause 0.1
    add "images/QP4.jpg"
    pause 0.1
    add "images/QP5.jpg"
    pause 0.1
    add "images/QP6.jpg"
    pause 0.1
    add "images/QP7.jpg"
    pause 0.1
    add "images/QP8.jpg"
    pause 0.1
    repeat


screen main_menu():
    # This ensures that any other menu screen is replaced.
    tag menu

    # The background of the main menu.
    add "titleimage"
I tried this and I still have a black screen... very confused...

EDIT! HAD TO CHANGE MM ROOT TO "titleimage" XD
I KNEW IT WAS SOMETHING STUPID!

Re: Main Menu ATL help

Posted: Fri Aug 21, 2015 4:17 pm
by xela
Or you had to copypaste the code which deleted the window... it doesn't matter, both approaches are fine.

Re: Main Menu ATL help

Posted: Fri Aug 21, 2015 8:39 pm
by Donmai
Define your image outside of the window, as suggested, this way:

Code: Select all

image titleimage:
    "images/QP1.jpg"
    pause 0.1
    "images/QP2.jpg"
    pause 0.1
    "images/QP3.jpg"
    pause 0.1
    "images/QP4.jpg"
    pause 0.1
    "images/QP5.jpg"
    pause 0.1
    "images/QP6.jpg"
    pause 0.1
    "images/QP7.jpg"
    pause 0.1
    "images/QP8.jpg"
    pause 0.1
    repeat
And then add it to your main menu screen.

Code: Select all

screen main_menu:

    tag menu

    window:
        style "mm_root"
    add "titleimage"
No need to use 'add' inside the image declaration.

Re: Main Menu ATL help

Posted: Fri Sep 28, 2018 2:42 am
by zeroTheHero
Hey, sorry to dig up this old thread but when I do the exact same thing I get an error equivalent to 'NameError: name "titleimage" is not defined'. 'show titleimage' in script.rpy works, so I'm not sure where I'm going wrong.