Game property:timer question.

Game Engine, Players & Web Plug-in, Virtual Reality, support for other engines

Moderators: jesterKing, stiv

Jedijds
Posts: 126
Joined: Mon Jan 30, 2012 5:19 am

Game property:timer question.

Postby Jedijds » Mon Mar 19, 2012 8:02 pm

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.
۞◄█°‖‖‖‖‖█ʭʭ╬(░▒▓▓▒▒▒▒▒▒▒▒▒)

mb
Posts: 37
Joined: Mon Feb 22, 2010 10:20 am

Re: Game property:timer question.

Postby mb » Tue Mar 20, 2012 6:57 pm

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.

Jedijds
Posts: 126
Joined: Mon Jan 30, 2012 5:19 am

Postby Jedijds » Tue Mar 20, 2012 7:43 pm

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.

mb
Posts: 37
Joined: Mon Feb 22, 2010 10:20 am

Postby mb » Tue Mar 20, 2012 8:14 pm

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?


Return to “Interactive 3d”

Who is online

Users browsing this forum: No registered users and 1 guest