0 Favourites

How do I add the remaining time to score

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

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

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • 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)
Similar Topics Posts Views Last Post
Unread hot topic
234 61,257
DARKSETH's avatar
DARKSETH
Unread hot topic
99 10,158
karshinkoff's avatar
karshinkoff
Unread hot topic
0 Favourites
Time to move forward?
110 9,563
GG-Works's avatar
GG-Works