Randomizing if an Ending Occurs?

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
Maychanx31
Newbie
Posts: 8
Joined: Tue Mar 06, 2018 3:32 am
Contact:

Randomizing if an Ending Occurs?

#1 Post by Maychanx31 »

Hello!

In the game I'm currently working on I'm looking to have a hidden ending and was curious if it was possible to have whether it triggers randomized each playthrough.

Thank you in advance,

May

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Randomizing if an Ending Occurs?

#2 Post by Remix »

jump expression renpy.random.choice( ['default_end'] * 4 + ['rare_end'] * 1 ) # 20% chance to choose rare
Frameworks & Scriptlets:

Post Reply

Who is online

Users browsing this forum: Bing [Bot]