Main Menu Video breaks when trying to add music
Posted: Wed Apr 04, 2018 1:45 pm
Hello!
This is the first time I've tried using a video for the background of the main menu for my game. It worked great until I tried adding music to the main menu using
The moment I turn that line on, my game starts and 1) No music plays, 2) my menu buttons aren't there, and 3) the game doesn't have a cursor.
My menu is a 16s loop and the main menu theme is 1 minute 40 seconds, so I don't want to just add music to the video to fix it if I don't have to.
I've also taken a short recording of the game working, then closing and opening the game again with the new code and it doesn't work.
https://youtu.be/fK4JA4vahOI
Code for my main menu:
This is the first time I've tried using a video for the background of the main menu for my game. It worked great until I tried adding music to the main menu using
Code: Select all
#config.main_menu_music = "music/mainmenu.ogg"My menu is a 16s loop and the main menu theme is 1 minute 40 seconds, so I don't want to just add music to the video to fix it if I don't have to.
I've also taken a short recording of the game working, then closing and opening the game again with the new code and it doesn't work.
https://youtu.be/fK4JA4vahOI
Code for my main menu:
Code: Select all
screen main_menu():
# This ensures that any other menu screen is replaced.
tag menu
add Movie(size=(1920, 1080))
on "show" action Play("movie", "movies/potd2_menu.webm", loop=True)
on "hide" action Stop("movie")
on "replace" action Play("movie", "movies/potd2_menu.webm", loop=True)
on "replaced" action Stop("movie")
imagebutton auto "ui/play_%s.png" xpos 870 ypos 800 focus_mask None action Start()
imagebutton auto "ui/load_%s.png" xpos 1180 ypos 850 focus_mask None action ShowMenu('load')
imagebutton auto "ui/options_%s.png" xpos 500 ypos 830 focus_mask None action ShowMenu('preferences')
imagebutton auto "ui/credits_%s.png" xpos 150 ypos 800 focus_mask None action ShowMenu('load')
imagebutton auto "ui/quit_%s.png" xpos 1600 ypos 820 focus_mask None action Quit()