Timers :o

Okay. Could some one please explain to me how to use timers in the BGE? I mean, like the timer property, or how to make the clock go up one second every second without being an always sensor that is dependent on the frame rate. I would also like to know how to measure intervals, like how much time it took for me to get from the first line to the next.

Thanks!-YA

Well timers are more independent than always sensors, but the ideal thing would be to use the Python time.time() method.

The timer property is simply a property that goes up like you would expect a normal timer to go up.

To make it increment a text object, simply make a Text object as normal, add a “Text” property, then set that property to “Timer”

Ah. So is the timer property independent of framerate as well?

Not completely. Through tests of my Clock/Timer application, I found it not to be entirely accurate. It is a lot better than an always sensor.

A better timer would be the time module, which contains a time.time function that gets the CPU’s clock and uses that for timing.

Its really quite hard to say if something really is completely accurate because the timer may be accurate, but the frame rate may be messing up how quickly it updates.
-Sunjay03

Than I guess I’ll go with the timer property. It is the simplest and semi-most-accurate way to go. Thanks!