Page 1 of 1

A reaction time task

Posted: Mon Apr 09, 2012 3:11 pm
by sheldor
Hi LiveCoders!

I am an absolute beginner, but have been tearing my hair out trying to solve this problem. Basically I am creating a reaction time task where the user has to click a box when it appears. The twist is, sometimes a tone will sound and this means the participant must do nothing (it is a response inhibition task). The box should then be shown for 3 seconds, unless the participant clicks it, then it should disappear. I need to record the number of times the participant clicked the button when they shouldn't have.

The problem is, I can't figure out how to do this. Can somebody please help, I can make the button appear for three seconds (using the wait command) and make it disappear when clicked, but I can't seem to work out how to achieve both.

Any help would be greatly appreciated - I have spend hours looking through the user guide and forums and need a bit of help.

Many thanks!

Re: A reaction time task

Posted: Mon Apr 09, 2012 5:15 pm
by mwieder
Use the "wait with messages" form of the wait command, otherwise it will block anything else from happening for the wait period:

Code: Select all

wait 3 seconds with messages

Re: A reaction time task

Posted: Tue Apr 10, 2012 2:54 am
by sheldor
Thank-you! This works well - I was initially confused by this command and thought it required a conditional... or something! Thanks for clearing things up :D

Re: A reaction time task

Posted: Tue Apr 10, 2012 3:04 am
by mwieder
Yeah, I think that's one of those language constructs that's only intuitive after someone's explained it to you :P