How do I make points rise gradually

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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

    -->add X to 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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)