[Solved]Way to stop movie in the main menu on mouse click

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
Nazon
Regular
Posts: 32
Joined: Thu Sep 22, 2016 10:03 am
Contact:

[Solved]Way to stop movie in the main menu on mouse click

#1 Post by Nazon »

I tried to use an avi file just before the main menu.
The tricky part is that the video should appear not before the menu, but on top of it.
As the video is soundless, main menu music should start together with the video and when the video ends, the main menu will appear.

Adding video in "label splashscreen" section would not help, as I still need the main menu music.

So I decided to use this instruction and add movie as main menu background:
viewtopic.php?t=18695

But I modified the code to stop the video after one iteration and place it on top of other screen elements:

Code: Select all

screen main_menu():       
    on "show" action [Play("movie", title_video, loop=False)] #This will show the video only one time
    on "hide" action Stop("movie")
    on "replaced" action Stop("movie")         
 
    tag menu    
    
    add title_bg1 size(None) align(0, 0) #This picture is hidden behind the video, but when it ends the picture will appear.
 
    use title_menu #Menu buttons and other stuff
    use CG_music_menu #
The main problem:
I can't skip the video with just clicking or pressing a key.
So the player would have to wait till the video ends before starting the game and this is annoying.

Is there any way to skip the video in the main menu with mouse click(or key press) ?

(I tried to use "on "clicked" action Stop("movie")" but it doesn't work.)
Last edited by Nazon on Thu Jun 21, 2018 12:56 pm, edited 1 time in total.

DannX
Regular
Posts: 99
Joined: Mon Mar 12, 2018 11:15 am
Contact:

Re: Way to stop movie in the main menu on mouse click

#2 Post by DannX »

Can't test right now but did you try key statement?

Code: Select all

key 'mouseup_1' action Stop("movie")

Nazon
Regular
Posts: 32
Joined: Thu Sep 22, 2016 10:03 am
Contact:

Re: Way to stop movie in the main menu on mouse click

#3 Post by Nazon »

DannX wrote: Mon Jun 18, 2018 4:22 pm Can't test right now but did you try key statement?

Code: Select all

key 'mouseup_1' action Stop("movie")
Yes, it works!
It's a pity, that I didn't try that before.
Thank you very much!

Post Reply

Who is online

Users browsing this forum: No registered users