How do I add the remaining time to score

0 favourites
  • 6 posts
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • I've searched the forum, read the manual but I couldn't find an answer. I want to convert the remaning time (it's a time critical game) into points and add it to the score. Any ideas? Thanks in advance.

  • Hi,

    You probably have a "time" variable in your project. When the player succeed the level just put a new event :

    system > add to > score

    And add the remaining time value to the score.

    You could also enter time*10 or such things.

    Hope it helps! Good luck!

  • Hi Rable, thanks for the reply. I do have a "time" variable (set to 10) and I already did what you say, but the value added to my score is the entire "time" value (10), not just the remaining time. For example, if the player finished the task in 4 seconds it will add 10, not just 6 as I want.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So I suppose you never decrease the time?

    You can do :

    system > every X seconds (every 0.1 second for example)

    add an action > system > subtract from

    and you subtract 0.1 from your time variable.

    Now your time will decrease by 0.1 every 0.1 second and the code above will work.

  • The time is decreasing, but I figured what I was doing wrong: I was reseting the time right after the event ended and before the "add to score" event, so obviously the time added would be 10. I changed it and I set the timer to reset on the begining of the next event, now it's woorking.

    Thanks a lot for your help!

  • Hi,

    You probably have a "time" variable in your project. When the player succeed the level just put a new event :

    system > add to > score

    And add the remaining time value to the score.

    You could also enter time*10 or such things.

    Hope it helps! Good luck!

    this worked for me thanks!

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