Main Menu - Background -> .gif-Animation

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
Zypharium
Newbie
Posts: 13
Joined: Thu May 26, 2011 1:39 am
Contact:

Main Menu - Background -> .gif-Animation

#1 Post by Zypharium » Thu May 26, 2011 1:53 am

Hello! I'm currently trying to animate my Background of my Main Menu, but it doesn't work at all! Sorry, I'm so pissed off! :cry: I've been trying it for at least two hours!

Well, anyways. I'll post the error.txt later, because I must leave for school! :mrgreen:

I already read someone's post in the archive, but it didn't work. I also tried this:

init:
image animation = Animation("frame_1.png", 0.25,
"frame_2.png", 0.25,
"frame_3.png", 0.25)

Were should I place the source code anyway?!

I tried it in "options.rpy".

This is how my attempt looked like:
1.

mm_root = "cover.png", (works but isn't animated, obviously)

then I tried:

mm_root = ("cover.png", 0.20, "cover2.png", 0.40, "cover3.png", 0.20 [...] ) (10 pictures)

then I tried: without "( and )"

mm_root = "cover.png", 0.20, "cover2.png", 0.40, "cover3.png", 0.20,

Once again my attempt failed.

And finally I tried:

init:
image animation = Animation("cover.png", 0.25,
"cover2.png", 0.25,
"cover3.png", 0.25) Were should I place the source code anyway?!

Error! How lucky am I?!

Please help me! I'm not that bad as a programmer, but I'm more used to C++ !

User avatar
OdysseyStudio
Regular
Posts: 94
Joined: Wed Oct 20, 2010 12:34 am
Location: Spokane, WA
Contact:

Re: Main Menu - Background -> .gif-Animation

#2 Post by OdysseyStudio » Thu May 26, 2011 11:43 am

Okay first, next time put your code snip in the "code HTML" function so we can troubleshoot it better next time but I can still help.

In order to do animation in renpy, pytom set up whats call ATL (Animation Transformation Language). Because of that, the animation thing you tried no longer works.

You can read more about ATL and the rest of Renpy's syntax here in the Documentation

With that in mind you can do this:

Code: Select all

init:
image main_menu:
    "frame_1.png" with Dissolve(0.5, alpha=True)
    0.25
    "frame_2.png" with Dissolve(0.5, alpha=True)
    0.25
    "frame_2.png" with Dissolve(0.5, alpha=True)
    repeat
Then in the options.rpy:

Code: Select all

    ## The background of the main menu. This can be a color
    ## beginning with '#', or an image filename. The latter
    ## should take up the full height and width of the screen.  
    mm_root = "main_menu",
you'll have to play around with it, but it should work. Hope this helps^^
The artist's world is limitless. It can be found anywhere, far from where he lives or a few feet away. It is always on his doorstep.
--Paul Strand

Zypharium
Newbie
Posts: 13
Joined: Thu May 26, 2011 1:39 am
Contact:

Re: Main Menu - Background -> .gif-Animation

#3 Post by Zypharium » Wed Jun 22, 2011 12:42 pm

It doesn't work. What am I doing wrong?

options.rpy

Code: Select all

mm_root = "main_menu",
options.rpy

Code: Select all

   init:
            image main_menu:
    "Cover1.png" with dissolve(0.5, alpha=True)
    0.25
    "Cover2.png" with dissolve(0.5, alpha=True)
    0.25
    "Cover3.png" with dissolve(0.5, alpha=True)
    repeat

Code: Select all

C:\Users\X\Desktop\X/game/options.rpy: invalid syntax

User avatar
manga_otaku
Veteran
Posts: 413
Joined: Fri May 20, 2011 1:27 pm
Completed: [KN] Saving Project: Blind? (Part One)
Contact:

Re: Main Menu - Background -> .gif-Animation

#4 Post by manga_otaku » Wed Jun 22, 2011 1:01 pm

Try moving the image main_menu under the init. Like this:

Code: Select all

init:
image main_menu:
    "Cover1.png" with dissolve(0.5, alpha=True)
    0.25
    "Cover2.png" with dissolve(0.5, alpha=True)
    0.25
    "Cover3.png" with dissolve(0.5, alpha=True)
    repeat
Put that in the options.rpy, where it says this:

Code: Select all

## The background of the main menu. This can be a color
        ## beginning with '#', or an image filename. The latter
        ## should take up the full height and width of the screen.
        mm_root = "mm_root",
So it looks like this:

Code: Select all

## The background of the main menu. This can be a color
        ## beginning with '#', or an image filename. The latter
        ## should take up the full height and width of the screen.
        mm_root = image main_menu,
I think the first part is correct, but I'm not sure about the second part (placing the image for the main menu).
Projects:
WIP|[KN] Day Of Reckoning|
Completed|[KN] Saving Project Blind: Part One|[KN] Saving Project Blind: Part Two|[KN] Saving Project Blind: Final Part|
Is available to help with proof-reading (Grammar freak...) Maybe voice-acting in the near future x]

Zypharium
Newbie
Posts: 13
Joined: Thu May 26, 2011 1:39 am
Contact:

Re: Main Menu - Background -> .gif-Animation

#5 Post by Zypharium » Wed Jun 22, 2011 1:06 pm

Code: Select all

I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game/options.rpy", line 59: invalid syntax
    init:
         ^
    

Ren'Py Version: Ren'Py 6.12.1.1501
Line 59 to 66

Code: Select all

    init:
    image main_menu:
    "Cover1.png" with dissolve(0.5, alpha=True)
    0.25
    "Cover2.png" with dissolve(0.5, alpha=True)
    0.25
    "Cover3.png" with dissolve(0.5, alpha=True)
    repeat
EDIT: Same error, even after I did the same you suggest.

User avatar
manga_otaku
Veteran
Posts: 413
Joined: Fri May 20, 2011 1:27 pm
Completed: [KN] Saving Project: Blind? (Part One)
Contact:

Re: Main Menu - Background -> .gif-Animation

#6 Post by manga_otaku » Wed Jun 22, 2011 1:45 pm

Do you have a space after the init? If I try it in JEdit...

Code: Select all

init:
    image main_menu:
        "Cover1.png" with dissolve(0.5, alpha=True)
        pause 0.25
        "Cover2.png" with dissolve(0.5, alpha=True)
        pause 0.25
        "Cover3.png" with dissolve(0.5, alpha=True)
        repeat
That's what it naturally comes out, indents and all. I don't usually mess around with animations or slideshows, so I don't know. I usually put a pause in front of things as well.
Projects:
WIP|[KN] Day Of Reckoning|
Completed|[KN] Saving Project Blind: Part One|[KN] Saving Project Blind: Part Two|[KN] Saving Project Blind: Final Part|
Is available to help with proof-reading (Grammar freak...) Maybe voice-acting in the near future x]

Zypharium
Newbie
Posts: 13
Joined: Thu May 26, 2011 1:39 am
Contact:

Re: Main Menu - Background -> .gif-Animation

#7 Post by Zypharium » Wed Jun 22, 2011 2:02 pm

It won't work, always the same error occurs. What a drag. So, do you have some other ideas in petto? :(

justanartistnamedkim
Newbie
Posts: 18
Joined: Fri Jul 15, 2011 4:14 pm
Contact:

Re: Main Menu - Background -> .gif-Animation

#8 Post by justanartistnamedkim » Mon Jul 18, 2011 7:07 pm

I'm having the same problem

User avatar
manga_otaku
Veteran
Posts: 413
Joined: Fri May 20, 2011 1:27 pm
Completed: [KN] Saving Project: Blind? (Part One)
Contact:

Re: Main Menu - Background -> .gif-Animation

#9 Post by manga_otaku » Mon Jul 18, 2011 7:50 pm

Projects:
WIP|[KN] Day Of Reckoning|
Completed|[KN] Saving Project Blind: Part One|[KN] Saving Project Blind: Part Two|[KN] Saving Project Blind: Final Part|
Is available to help with proof-reading (Grammar freak...) Maybe voice-acting in the near future x]

Post Reply

Who is online

Users browsing this forum: _ticlock_