Collect 450 coins

6 Likes

nice!

Good job

Your animations are great.
I would be nice if we could change the timer by a value, instead of only being able to set it. That way you could for instance add 1 second to the timer, each time the player gets a coin.

Thanks!

but here is the thing though… I don’t know how to do that. do you know how? please tell me!

1 Like

Thanks!

1 Like

Hi there. I added these variables which define how many coins there are in the game, and how much time is remaining before the countdown ends. So basically, you start with 5 seconds, and get an extra 0.5 seconds each time you get a coin.

In the overlap event (when getting a coin), I added 4 lines of code which sets the remaining time in the game. In the ‘Game’ section, ‘time since start (ms)’ is the number of milliseconds since the game started (which is set to ‘timeSinceGettingLastCoin’ at the start). I then get the ‘timeDifference’, and set the remaining time to be what you start with, less the difference, plus the extra time for getting a coin. I set the countdown again and set the value of ‘timeSinceGettingLastCoin’ again.

You can adjust the variables in the game start to suit how much time to start with (secondsAtStart), and how much extra time you get for each coin (extraTimeGettingCoin, this is in seconds, a half second).

You’re welcome. :+1: