I have a racing game. How can I record the time it takes to go round the track?
More about the code I already have, when the car(sprite) crosses the finish line the lap variable increases by one. When this happens can I do a time stamp? I also have the timer to reset when the race starts....
Thanks for any guidance.
Offline
plstrboi wrote:
I have a racing game. How can I record the time it takes to go round the track?
More about the code I already have, when the car(sprite) crosses the finish line the lap variable increases by one. When this happens can I do a time stamp? I also have the timer to reset when the race starts....
Thanks for any guidance.
Well there are two ways of going about this. The first way is creating a variable and setting it to the timer at the end of each lap, or if you want to record multiple lap times and not just the last one, you could create a list and add the timer to it at the end of each lap.
I hope that this answers your question!
Offline
in scratchblocks form:
when gf clicked forever change [timre v] by (1) // or any # wait (1) secs// the number to even out the time when gf clicked wait until <touching [start/finish line v] ?> add (timre) to [list v]
Last edited by gfchll (2012-10-29 20:44:03)
Offline