Creating a simple score keeping mechanic? [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.
-
- Newbie
- Posts: 4
- Joined: Thu Nov 08, 2018 12:36 pm
- Contact:
Creating a simple score keeping mechanic? [SOLVED]
So, I'm incredibly new at this and want to create a scenario for a dating sim where depending on your answers, your overall 'score' with a character will go up or down. So, for example, you say something they like, you get maybe +5 to their overall score. I want to try to figure this out and I know it's possible (and probably super easy and I'm asking a dumb question) but I'm afraid of screwing up my program so far. I've done it before and I really don't want it to happen again. Can anyone help me?
Last edited by SplashyDashyBomBashi on Fri Nov 09, 2018 11:20 am, edited 1 time in total.
Re: Creating a simple score keeping mechanic?
You can create a variable called SCORE and change its value depending on the choice. Should be something like this:
BTW, you use the (-=) if you want to deduct, and (+=) if you're going to add.
Code: Select all
h " It's time for the Mega-Lottery Quiz!"
$ score = 0 #This is the variable that stores your score
menu:
"Question 1: What color is the sky?"
"BLUE":
$ score += 5
"INDIGO":
$ score += 3
"Azule":
$ score += 1
"RED"
$ score -= 100
-
- Newbie
- Posts: 4
- Joined: Thu Nov 08, 2018 12:36 pm
- Contact:
Re: Creating a simple score keeping mechanic?
Thanks - I'll try this out! I'm not very good at this, so we'll see how I do!
Re: Creating a simple score keeping mechanic?
Don't worry about it If you have any problems, don't hesitate to ask away.SplashyDashyBomBashi wrote: ↑Fri Nov 09, 2018 11:05 am Thanks - I'll try this out! I'm not very good at this, so we'll see how I do!
Who is online
Users browsing this forum: Andredron