animated logo on main menu

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
bokuman
Regular
Posts: 65
Joined: Tue May 23, 2017 1:08 pm
Projects: VN 789
Deviantart: bokuman
Contact:

animated logo on main menu

#1 Post by bokuman »

I searching how to do an animated logo on my main menu, i wanna use some transformations, but doesnt works. any help is welcome. i tried to use this code as exmaple

Code: Select all

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

    window:
        xpadding 0
        ypadding 0
        add "mylogo"
        
    image mylogo:
        "gui/main_logo.png"
        xanchor 0.5
        yanchor 0.5
        rotate 0
        linear 50.0 rotate 360
        repeat 
and i received this error

Code: Select all

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


File "game/screens.rpy", line 36: expected a keyword argument or child statement.
    "gui/main_logo.png"
    ^

Ren'Py Version: Ren'Py 6.99.11.1749

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3791
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: animated logo on main menu

#2 Post by Imperf3kt »

Try this:

Code: Select all

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

    window:
        xpadding 0
        ypadding 0
        add "mylogo"
        
    image mylogo = "gui/main_logo.png":
        xanchor 0.5
        yanchor 0.5
        rotate 0
        linear 50.0 rotate 360
        repeat
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

bokuman
Regular
Posts: 65
Joined: Tue May 23, 2017 1:08 pm
Projects: VN 789
Deviantart: bokuman
Contact:

Re: animated logo on main menu

#3 Post by bokuman »

i received same error like before D:

Code: Select all

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


File "game/screens.rpy", line 34: expected a keyword argument, colon, or end of line.
    image mylogo = "gui/main_logo.png":
                 ^

Ren'Py Version: Ren'Py 6.99.11.1749
[/code]

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: animated logo on main menu

#4 Post by Divona »

This is screen language. I can't recall that "image" has its place there. Take it out of the screen block.

Code: Select all

image mylogo:
    "gui/main_logo.png"
    xanchor 0.5
    yanchor 0.5
    rotate 0
    linear 50.0 rotate 360
    repeat

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

    window:
        xpadding 0
        ypadding 0
        add "mylogo"
Completed:
Image

bokuman
Regular
Posts: 65
Joined: Tue May 23, 2017 1:08 pm
Projects: VN 789
Deviantart: bokuman
Contact:

Re: animated logo on main menu

#5 Post by bokuman »

Works!!! but now the dialogue box is on main menu... LOL

User avatar
Taleweaver
Writing Maniac
Posts: 3428
Joined: Tue Nov 11, 2003 8:51 am
Completed: Metropolitan Blues, The Loyal Kinsman, Daemonophilia, The Dreaming, The Thirteenth Year, Adrift, Bionic Heart 2, Secrets of the Wolf, The Photographer
Projects: The Pilgrim's Path, Elspeth's Garden, Secret Adventure Game!
Organization: Tall Tales Productions
Location: Germany
Contact:

Re: animated logo on main menu

#6 Post by Taleweaver »

Moved to Ren'Py Questions.
Scriptwriter and producer of Metropolitan Blues
Creator of The Loyal Kinsman
Scriptwriter and director of Daemonophilia
Scriptwriter and director of The Dreaming
Scriptwriter of Zenith Chronicles
Scriptwriter and director of The Thirteenth Year
Scriptwriter and director of Romance is Dead
Scriptwriter and producer of Adrift
More about me in my blog
"Adrift - Like Ever17, but without the Deus Ex Machina" - HigurashiKira

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: animated logo on main menu

#7 Post by Divona »

bokuman wrote:Works!!! but now the dialogue box is on main menu... LOL
That sound like Ren'Py already run "label start" and you chose to "show screen main_menu". I have to guess here as I have no idea what you did.
Completed:
Image

bokuman
Regular
Posts: 65
Joined: Tue May 23, 2017 1:08 pm
Projects: VN 789
Deviantart: bokuman
Contact:

Re: animated logo on main menu

#8 Post by bokuman »

I removed "window" and now works perfectly :D

Code: Select all

image mylogo:
    "gui/main_logo.png"
    xanchor 0.5
    yanchor 0.5
    rotate 0
    linear 50.0 rotate 360
    repeat

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

    add "mylogo"


I was searching to do a small animation with addtive and zoom, the final code is.

Code: Select all

image menuadd:
    pause 3.0
    "gui/menuadd.png"
    alpha 0.0 
    xalign 0.49 yalign 0.93
    additive 1.0
    pause 0.1
    linear 5.0 alpha 1.0
    pause 0.1
    linear 5.0 alpha 0.0
    repeat

image backadd:
    pause 2.0
    "gui/config_ground_add.jpg"
    alpha 0.0 
    xalign 0.5 yalign 0.5
    additive 1.0
    pause 0.6
    linear 4.0 alpha 1.0
    pause 0.1
    linear 4.0 alpha 0.0
    repeat

image addlogo:
    pause 1.0
    "gui/main_logo_add.png"
    alpha 0.0 
    xalign 0.5 yalign 0.3
    ypos 0.2
    additive 1.0
    pause 0.6
    linear 2.0 alpha 1.0
    pause 0.1
    linear 2.0 alpha 0.0
    repeat

image mylogo:
    pause 1.2
    "gui/main_logo.png"
    alpha 0.0
    xalign 0.5 yalign 0.3
    linear 0.2 ypos 0.2
    linear 0.1 alpha 1.0

image mylogoblank_3:
    pause 1.2
    "gui/main_logo_blank.png"
    xalign 0.5 yalign 0.3
    ypos 0.2
    zoom 1.5
    linear 0.1 zoom 1.0 
    linear 0.5 alpha 0

screen main_menu:
    tag menu 

    add "gui/main_menu_ground.jpg" 
    add "backadd"
    add "mylogo"
    add "mylogoblank_3"
    add "addlogo"

Post Reply

Who is online

Users browsing this forum: Andredron, Bing [Bot], Majestic-12 [Bot]