# How do I make points rise gradually

Get help using Construct 2

### » Fri Feb 06, 2015 1:28 pm

Hi

I have a text object showing the number of points the user has
User acquires some more points, and i want the score to rise gradually, showing the numbers going up quickly.
If it's possible, i'd like to control the speed the numbers change with an easing function

What's the best practice on achieving such an effect?

Thanks,
R.
B
3
Posts: 1
Reputation: 177

### » Fri Feb 06, 2015 1:34 pm

Assuming the score is in a variable, you can use some basic math to keep adding X while the number in text is not equal to score

X is any small number that you can get by different formulas, but I would suggest making the value of X proportional to the score, so it will work as ratio (even if score is lower than 10 or even as high as millions). Use division to get X value.

I hope you understood my explanation. I'm not good at explaining.

text number < score

Just replace X with your expression

You have to use another variable probably for the text number because you want to add to it instead of showing the score at all times.

Edit: use the new variable like this.

Every tick
-> Set text to text number variable

text number variable is separate variable from score.

Also, add another event to set text number variable to score if it exceeds score (after increasing by X) just to make sure it is consistent with the real score
B
16
S
7
Posts: 301
Reputation: 2,686