Is the Timer property-type not working in 2.5?

Hey guys,

I’ve read somewhere that if you give an object a Timer property, the property will increase by 1 every second. I made some tests, but it didn’t work.
Is the Timer not working in 2.5 or is it just me being wrong?

:spin::spin::spin: Luke :spin::spin::spin:

It works for me. Are you sure you have a “Timer” property and not something like a float or integer?

Yes I’m sure. What I did was make a Timer property called time. Then I added a property Sensor that will end the object if time equals 20. But after 20 seconds, nothing happened…

Luke

You can’t compare a timer with equal. If you enable debug, you see it does not catch discret values.

Better check for intervall 20 to 99999

Omg Omg yes it works! Awesome! Thank you Monster thanks a lot :smiley:

Is there actually a way to make an actuator changing the property type so that the timer only start at a certain event like for example hitting the spacebar?

You could reset the timer property (property actuator setting the timer prop to 0). At this point you might need a second property (some sort of boolean flag) that is set to true when your event happens. Then you’d have two property sensors: one to check if the timer property is in an acceptable range and the other to check if your flag is true.

how can you modify the state true/false of the boolean? Because that would be an awesome idea :smiley:

Luke

Edit: It’s alright I took an integer instead and used binary code (1 true 0 false xD)

Just assign/check for “True” or “False” (with that spelling and without ")

Use the Property actuator. Set the variable to be the property you need, and set the value to either 1 (True) or 0 (False).