Creating A Reaction Timer
cracky6711
Member Posts: 9
I am currently creating an app which involves finding the users reaction time.
I have set up a scene with a big red square and i have a big green square (GreenPanel) as an actor.
Here are the terms:
Timer: Every 0.1 seconds Run To Completion
set: (game.SpawnTiming) to: random (1,10)
When: (game.SpawnTiming) = 1
spawn actor: GreenPanel
This system seems to activate before the scene is loaded so the green panel is always spawned before the user gets to the reaction timer scene. If i then go back and try again it works fine.
Another issue i'm having:
I want to save the reaction time as an attribute. I have created an attribute called ReactionTimer and GameTimer.
Here's what I have set up:
For the big red square:
Under the "When: (game.SpawnTiming) = 1"
i have: set (game.GameTimer) to 1
Terms for the green square:
if (game.GameTimer) = 1
every 0.1 seconds set (game.ReactionTimer) to (game.ReactionTimer)+0.1
when touch is pressed set (game.GameTimer) to 0.
In another scene I have a box which has a display text attribute set to display (game.ReactionTimer) however this just stays as 0.
If anyone could help I would much appreciate it!
Thanks
I have set up a scene with a big red square and i have a big green square (GreenPanel) as an actor.
Here are the terms:
Timer: Every 0.1 seconds Run To Completion
set: (game.SpawnTiming) to: random (1,10)
When: (game.SpawnTiming) = 1
spawn actor: GreenPanel
This system seems to activate before the scene is loaded so the green panel is always spawned before the user gets to the reaction timer scene. If i then go back and try again it works fine.
Another issue i'm having:
I want to save the reaction time as an attribute. I have created an attribute called ReactionTimer and GameTimer.
Here's what I have set up:
For the big red square:
Under the "When: (game.SpawnTiming) = 1"
i have: set (game.GameTimer) to 1
Terms for the green square:
if (game.GameTimer) = 1
every 0.1 seconds set (game.ReactionTimer) to (game.ReactionTimer)+0.1
when touch is pressed set (game.GameTimer) to 0.
In another scene I have a box which has a display text attribute set to display (game.ReactionTimer) however this just stays as 0.
If anyone could help I would much appreciate it!
Thanks
Comments
[I'm moving this out of Tech Support since it's not a support-related issue.]
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Would it be possible to send you a zip of my project?
Sure, you can send me your project file. Compress it as a .zip file, upload it to a file-sharing service and then PM me with the link to download.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User