[solved] setting correct_response in keybord_response items
I have an issue I haven't been able to fix and would really appreciate if somebody could help me out.
In my experiment participants see a stimulus and are supposed to judge if it is a word or a nonword by pressing either "z" or "/" . The stimuli are displayed on a sketchpad and responses are collected by keybord_response items.
Response keys are counterbalanced in the ''counterbalance'' loop. A variable called [wrd] says which key signals words and [nonwrd] does similarly for nonwords. Now, to code whether a stimulus is a real word the variable [real] is created in practise/main_task loops. If [real] = 1, it is a word.
All I want to do is to set correct_response in keyboard_response items so it would be true, i.e.,
if real = 1: set correct_response [wrd] else: set correct_response [nonwrd]
I tried to do it by creating two keyboard_response items (i.e., word_response with correct_response set to [wrd] and nonwrd_resp set to [nonwrd]) and running them accordingly to [real] for each stimulus. For some reason though, it seems that after the first cycle BOTH items are being run for each stimulus.
Then I tried to write a bit of inline_script that would the trick, but failed.
There is one more thing about my design you might have noticed looking at the screenshot attached. There is a couple of sketchpads in each sequence, but only one of them is being randomly chosen and run for a cycle. The colour_script is doing it for me. I don't think this has much to do with my problem, but I'm mentioning here just in case.
I would be most grateful for any help. Thanks!