How do I Time score

  • Hello, I have a timer and score and I would like for example. Maximum score you can win = 1000. If it takes 1 second = 1000, 2sec = 999 3sec = 998 something like that. I've tried it and nothing.

    Anyone know how to do this without putting a thousand times the same

  • some event that starts your game:

    gametime_start = time

    some event that ends your game and assigns the score:

    set score = 1000 - int(time - gametime_start)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • have a compare game time event.

    on gaining the points score=score + (1000 - round(time))

    at least that would be 1000- (1 per second of game time)

    can be reversed so you gain more points the longer you are alive for if that helps

  • You can put it like an event? I am a bit lost

    I do not need to create any variables not?

    I Have Score - Highscore - Timer...

  • as an event

    score=score + (1000 - round(time))

    just typing "time" counts as the game time from start of layout

    round stops it from being a decimal.

    if your aim is to get to 1000, the more time alive, the larger the score added

    score is a global variable

    as an event : every (1) second --------- score = score + time

    then have a text box somewhere with the event: everytick---------text set text to ""&score

    this will make it so on 1 second, 1point is added ----score=1

    on 2 seconds, 2 points are added ---- score =1+2 (3)

    on 3 seconds, 3 points are added --- score = 3+3 (6) etc

    the other thing i typed would add a value thats less every second....

    1second score= 999

    2seconds score=999+ (998) etc

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