Keyboard response
Hi! Stumped again. I think I am on #15 of trying the tutorial (basic).
I have "Enter 'z;m' in the allowed-responses field" and time to 2000.
No matter how many times I press z or m, it gives me the GONG that I gave the wrong answer, where can I look for my error?
Comments
Hi @jdmill51,
Just lookig at the program you uploaded, I cn see that you always get the gong sound because thre is nothing in your program to limit it to trials with incorrect responses...
There is no reason you would't get on every single trials, unless you condition the presentation of the sound to incorrect responses.
Best,
Fabrice.
Thank you. I have tried it both ways with correct==0. Same result.
I fixed this with the sound, yet still I run the experiment, press z or m for the proper response of F or H, and get the gong, and at the end get a 0% correct.
Hi @jdmill51,
There are sevral errors in your task...
(1) You declared the correct response as the variable "correct" in your loop, but correct is a reserved variable name OS uses to store the score (1 or 0). You should call it something else. The recommendation is to call it correct_response (that way, you don't have to specify a specific variable in the keyboard object).
(2) You set the target sketchpad with a duration of "keypress". That means that subject have to press a key to pass that sketchpad and then arrive at the keyboard event where the latter then waits for a response. Set the duration of the target sketchpad to 0.
(3) in the Run if", if you are using OS version 4, use
correct == 0instead ofcorrect==0. If you are using OS version 3, use[correct]==0(note that this method will work in verison 4 too for now).Best,
Fabrice.
PS: when posting to the forum, use the handlers (type "@" foillowed by the first letters of your correspondent, so that they get notified - I saw your message my chance this time).
Thank you, I will go try.
Got it working, thank you for your help.
I fixed it by editing the code:
Original:
setcycle 2 "
target_letter" F
setcycle 2 congruency incronguent (using the full factorial design, it misspelled incongruent)
setcycle 2 correct_response z
setcycle 2 dist_pos 300
setcycle 2 gaze_cue left
setcycle 2 target_pos -300
Fixed:
setcycle 2 target_letter F (making this one line and removing the " made it work), I saw this in the Lexical-decision task).
setcycle 2 congruency incongruent
setcycle 2 correct_response z
setcycle 2 dist_pos 300
setcycle 2 gaze_cue left
setcycle 2 target_pos -300
I feel better, thank you for all your help, coffee coming your way shortly. I noticed using the Full-Factorial button, it added extra " in the code, and when that was removed, all works. Sound too.
Sorry forgot to add @Fab