(SOLVED) Looping an AVI file in Main Menu and adding imagemap buttons for it.

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
User avatar
Fisseha
Newbie
Posts: 20
Joined: Thu May 24, 2018 8:11 am
Projects: Fly Fly Fly, Grey Area, SICK, Raindrops, My Girlfriend Akane
Organization: Lonely Fish
Tumblr: PoissonMorts
Deviantart: MiyukiKudo(INACTIVE)
itch: FishPrincess
Location: Philippines
Contact:

(SOLVED) Looping an AVI file in Main Menu and adding imagemap buttons for it.

#1 Post by Fisseha »

Hi! I managed to find a way to play an AVI file as my Main Menu's screen, except it's not permanent, as it reverts back to the default main menu screen. Basically, I can't loop it lol.

Also, I've made an image map, and I want to ask if it's possible to make them appear on top of the video while it's looping, if so, how do you do it?

I've included an attachment of the general idea of the menu.

And here's the script (incase you need it to fix my problem.):

screen main_menu:

tag menu

style_prefix "main_menu"

add Movie(size=(1280, 720))
on "show" action Play("movie", "menu.avi", "loop=True")
on "hide" action Stop("movie")
on "replaced" action Stop("movie")
on "start" action Stop("movie")
(I also have this in my navigation part of the script ^)

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


imagemap:

idle "idle"
hover "hover"

hotspot(124, 644, 160, 43) action Start
hotspot(296, 644, 238, 44) action ShowMenu("load")
hotspot(1034, 644, 111, 42) action Quit(confirm=False)
hotspot(776, 645, 230, 44) action ShowMenu("extras")
hotspot(562, 646, 180, 43) action ShowMenu("preferences")
Attachments
The General Idea of the Main Menu I'm making.
The General Idea of the Main Menu I'm making.
Last edited by Fisseha on Sun Jun 17, 2018 6:09 am, edited 1 time in total.
I'm an artist, and probably a weaboo.

kivik
Miko-Class Veteran
Posts: 786
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: Looping an AVI file in Main Menu and adding imagemap buttons for it.

#2 Post by kivik »

Try making your video a displayable first: https://www.renpy.org/doc/html/movie.ht ... ie-sprites

Then add it to the screen instead of playing it, then it'll loop automatically. Play is actually meant to be an audio action: https://www.renpy.org/doc/html/screen_actions.html#Play so it's interesting that it works for movies as well! But it seems it's not intended for repeating.

User avatar
Fisseha
Newbie
Posts: 20
Joined: Thu May 24, 2018 8:11 am
Projects: Fly Fly Fly, Grey Area, SICK, Raindrops, My Girlfriend Akane
Organization: Lonely Fish
Tumblr: PoissonMorts
Deviantart: MiyukiKudo(INACTIVE)
itch: FishPrincess
Location: Philippines
Contact:

Re: Looping an AVI file in Main Menu and adding imagemap buttons for it.

#3 Post by Fisseha »

@Kivik

Ah, That was fast! At least I learned something today.

Also, It worked like a charm! Thank you very much for your help! <3
I'm an artist, and probably a weaboo.

Post Reply

Who is online

Users browsing this forum: IrisColt, mold.FF