Random Fact Generator?

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
Dylan_Bain
Regular
Posts: 101
Joined: Mon Mar 09, 2015 2:05 pm
Organization: Dylan Bain Games
Location: Scotland
Contact:

Random Fact Generator?

#1 Post by Dylan_Bain » Sat Apr 04, 2015 11:40 am

Hey guys!

How could you code a random fact generator into Ren'py using JEdit, or into RPG Maker Ace/XP?

The way I want it to work is the player can give 1 game coin into a machine that will then give him a fact about the world at random.

Thanks!
Image
http://lemmasoft.renai.us/forums/viewto ... 52#p365552 Curently NOT Accepting Commisions!

User avatar
xavimat
Eileen-Class Veteran
Posts: 1458
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Contact:

Re: Random Fact Generator?

#2 Post by xavimat » Sat Apr 04, 2015 1:50 pm

In renpy:

Code: Select all

$ facts = ["fact1", "fact2", "fact3", "fact4", "fact5"]
$ fact = renpy.random.choice(facts)
"Fact: [fact]"
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]