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.
-
ShiraiJunichi
- Miko-Class Veteran
- Posts: 651
- Joined: Sat May 21, 2005 12:28 pm
- Location: University of Utah
-
Contact:
#1
Post
by ShiraiJunichi » Sun Aug 23, 2009 2:16 pm
I would like to play music and perform some animations when the game enters the main menu. Before I was able to do the following:
Code: Select all
label main_menu:
# code to play music and perform animations
jump _library_main_menu
That jump statement no longer works. And I think jumping to the main menu created a new scene, which replaces any images/animations currently displayed with the main menu background. How can I edit the menu so animations will be displayed until the user selects an option?
-
JQuartz
- Eileen-Class Veteran
- Posts: 1265
- Joined: Fri Aug 31, 2007 7:02 am
- Projects: 0 completed game. Still haven't made any meaningfully completed games...
-
Contact:
#2
Post
by JQuartz » Sun Aug 23, 2009 10:03 pm
ShiraiJunichi wrote:How can I edit the menu so animations will be displayed until the user selects an option?
Just put the animation in the main_menu like so:
Code: Select all
label main_menu:
python:
ui.image(Animation("image1.png",0.25, "image2.png",.25, "image3.png",0.25))
ui.textbutton("Start", ui.jumpsoutofcontext("start"),xalign=1.0)
ui.interact()
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.
-
ShiraiJunichi
- Miko-Class Veteran
- Posts: 651
- Joined: Sat May 21, 2005 12:28 pm
- Location: University of Utah
-
Contact:
#3
Post
by ShiraiJunichi » Sun Aug 30, 2009 12:31 pm
Thanks. Though that code requires that you place the buttons and everything yourself. That's probably necessary when the animation must continue to play while waiting for the user- but the particular animation I'm doing only animates before the user interaction.
So, I found that replacing "_library_main_menu" with "main_menu_screen" seems to work.
-
Aang
- Regular
- Posts: 36
- Joined: Sat Sep 05, 2009 1:57 pm
- Projects: Gen'sou shrine
- Location: Quebec whoohoo!
-
Contact:
#4
Post
by Aang » Sat Sep 05, 2009 7:34 pm
But how can we put some music during the main menu?
-
Aleema
- Lemma-Class Veteran
- Posts: 2677
- Joined: Fri May 23, 2008 2:11 pm
- Organization: happyB
- Tumblr: happybackwards
-
Contact:
#5
Post
by Aleema » Sat Sep 05, 2009 11:27 pm
ShiraiJunichi wrote:Thanks. Though that code requires that you place the buttons and everything yourself. That's probably necessary when the animation must continue to play while waiting for the user- but the particular animation I'm doing only animates before the user interaction.
So, I found that replacing "_library_main_menu" with "main_menu_screen" seems to work.
Do you mean, like a splash page or intro animation? There are scripts for that in the Cookbook; may save you some time.
And yes, making stuff look good requires some hard work, silly. :p
Gen'sou wrote:But how can we put some music during the main menu?
Look for a line of text commented out in your
options.rpy file. Uncomment it and put in the location of your music track.
Code: Select all
## Music that is played while the user is at the main menu.
#config.main_menu_music = ""
Users browsing this forum: No registered users