Point system for different endings?

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
erintesden
Newbie
Posts: 2
Joined: Sat May 30, 2020 4:37 pm
Contact:

Point system for different endings?

#1 Post by erintesden » Sat May 30, 2020 4:45 pm

Im doing a visual novel with a romance themathic, but with only two characters: The protagonist and his romance interest.

Initially it was going to be kinetic, but then I decided it would be better to include different endings: A good, a normal and a bad one.

And base them in a point system, so for example: Theres 20 questions that gives you the possibility of winning 20 points respectively. If you win less than 10 you obtain the bad ending. if you win 10 - 17 points you get the normal ending, and if you win 18-20 you obtain the good ending.
Something like that

Now, how could I write this conditions?

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: Point system for different endings?

#2 Post by Per K Grok » Sun May 31, 2020 1:36 am

erintesden wrote:
Sat May 30, 2020 4:45 pm
Im doing a visual novel with a romance themathic, but with only two characters: The protagonist and his romance interest.

Initially it was going to be kinetic, but then I decided it would be better to include different endings: A good, a normal and a bad one.

And base them in a point system, so for example: Theres 20 questions that gives you the possibility of winning 20 points respectively. If you win less than 10 you obtain the bad ending. if you win 10 - 17 points you get the normal ending, and if you win 18-20 you obtain the good ending.
Something like that

Now, how could I write this conditions?

Code: Select all

default points=0

-------------
    menu:
        "This is a question?"
        "Yes":
            $ points +=1
            jump nextlabel 
        "No":
            jump nextlabel
            
----------------

    if points<10:
        jump badend
    elif points<18:
        jump normend
    else:
        jump goodend



User avatar
Alex
Lemma-Class Veteran
Posts: 2981
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Point system for different endings?

#3 Post by Alex » Sun May 31, 2020 3:50 am


Post Reply

Who is online

Users browsing this forum: Bing [Bot], span4ev