Previous Thread  Next Thread

chat icon Game property:timer question.

Jedijds

Posted: Mon Mar 19, 2012 8:02 pm
Joined: 30 Jan 2012
Posts: 115
How can you get the timer to stop and start? Like I don’t want it to run until I cross the start line then stop after I cross the finish line.
_________________
۞◄█°‖‖‖‖‖█ʭʭ╬(░▒▓▓▒▒▒▒▒▒▒▒▒)
Reply with quote


mb

Posted: Tue Mar 20, 2012 6:57 pm
Joined: 22 Feb 2010
Posts: 37
Jedijds wrote:
How can you get the timer to stop and start? Like I don’t want it to run until I cross the start line then stop after I cross the finish line.


Rather than using a timer property, I would suggest to create your own custom controlled timer variable:
- create a float variable called 'myTimer', initialized at 0.
- use a property actuator that adds 1/60. to myTimer at every frame.
- build a logic that activates the actuator when you press 'start' and stops it when you press stop.
Another property actuator can be used, for example, to reset myTimer to zero.
Reply with quote


Jedijds

Posted: Tue Mar 20, 2012 7:43 pm
Joined: 30 Jan 2012
Posts: 115
Not to sound rude,
I was thinking of that but I want it in milliseconds and doing like that wont let me get the accurate time like the timer property will let me. I just don’t know how to get it to start and stop.
Sorry I’m trying to make a reflex game to increase eye to hand reaction time but I need some thing that will stay consistent. I’m very techy, scientific and exact.
Reply with quote


mb

Posted: Tue Mar 20, 2012 8:14 pm
Joined: 22 Feb 2010
Posts: 37
Jedijds wrote:
Not to sound rude,
I was thinking of that but I want it in milliseconds and doing like that wont let me get the accurate time like the timer property will let me. I just don’t know how to get it to start and stop.
Sorry I’m trying to make a reflex game to increase eye to hand reaction time but I need some thing that will stay consistent. I’m very techy, scientific and exact.


Is it then possible to catch events with a time resolution better that 1/60. seconds (or 16.666... ms) using blender logic bricks?
Also, your requirements imply that your input sensors (joystick, keyboard or whatever) are polled with very high sampling rate; or may be that, when activated, they immediately interrupt any other CPU process?
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group