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.
-
Stapper
- Regular
- Posts: 96
- Joined: Wed Feb 27, 2013 9:54 pm
-
Contact:
#1
Post
by Stapper » Wed Mar 19, 2014 11:49 am
I would like to implement a random chance test in my game depending on the stats and gear of the player. I have calculated their chance and save it as: $ chance_number
Now they have chance_number out of 10 to pass the test. How can I calculate this? I thought about using the renpy.random.randint function, but I don't know how to use it to see if they would pass the actual test.
Can anyone please show me how to do this

Last edited by
Stapper on Wed Mar 19, 2014 12:53 pm, edited 1 time in total.
-
Stapper
- Regular
- Posts: 96
- Joined: Wed Feb 27, 2013 9:54 pm
-
Contact:
#3
Post
by Stapper » Wed Mar 19, 2014 12:53 pm
Seems to works perfectly
Thanks again Alex!
Users browsing this forum: Bing [Bot]