Title Screen Random Background

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
PaperTsuru
Newbie
Posts: 1
Joined: Fri Feb 19, 2016 6:11 pm
Contact:

Title Screen Random Background

#1 Post by PaperTsuru » Fri Feb 19, 2016 6:25 pm

How can I make the background picture on the title screen random?

Explaining Better:
There are three pictures (tree, cat, mountain for example); and every time you open the game it can be any one of these. You could open and see the cat picture, and the next time you close the game it may be the cat again, or show either the tree or the mountain picture.

Sorry if it's confusing, english isn't my native language

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Title Screen Random Background

#2 Post by xela » Fri Feb 19, 2016 6:27 pm

Like what we're doing? Support us at:
Image

User avatar
Shakezula
Regular
Posts: 67
Joined: Wed May 20, 2015 8:01 pm
Organization: Digital Sandbox
Contact:

Re: Title Screen Random Background

#3 Post by Shakezula » Fri Feb 19, 2016 7:49 pm

Code: Select all

background = renpy.random.choice(['cat.png', 'tree.png', 'mountain.png'])

Post Reply

Who is online

Users browsing this forum: Google [Bot], Nikel