I get point-based story changes, but would it work with three or more endings? I mean, that was probably a dumb question, but I just wanted to check.
Would that be something like this?
At the beginning of the script
$ good_ending = 0
$ bad_ending = 0
$ true_ending = 0
Then after every choice,
$ good/bad/true_ending += 1
And then lastly
if good_ending > bad_ending
jump good_ending
if bad_ending > good_ending
jump bad_ending
if true_ending > bad_ending and good_ending
jump true_ending
from here, how would I make it so that it would read as "If true_ending is greater than both bad_ending and good_ending, jump to the true ending? Is it just a simple "and" or something else? I'm not very experienced obviously lol.
Any answers would be much appreciated, thanks!
Point-based change to the story- 3 endings? [SOLVED]
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.
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.
Point-based change to the story- 3 endings? [SOLVED]
Last edited by Cinto on Sun Apr 28, 2013 6:47 pm, edited 1 time in total.
-
apricotorange
- Veteran
- Posts: 479
- Joined: Tue Jun 05, 2012 2:01 am
- Contact:
Re: Point-based change to the story- 3 endings?
Code: Select all
if true_ending > bad_ending and true_ending > good_ending:Re: Point-based change to the story- 3 endings?
Some holes in your approach that can lead to bugs like two or all three variables having equal values or the only way true_ending activates is that if bad_ending == good_ending and does not equal true ending.
Try something like:
Try something like:
Code: Select all
if good_ending <= true_ending >= bad_ending:
jump true_ending
elif good_ending >= bad_ending:
jump good_ending
else:
jump bad_ending
Re: Point-based change to the story- 3 endings?
Thanks for answering my question, that really helps.
