Hi!
I have a problem regarding the evaluation whether a response is correct or not. I read several posts in the forum, but my code seem not to work.
In my task a white 4x4 grid (16 rectangles defined as R1-R16) is presented. In a trial of the task a specific sequence of rectangles, e.g. R4, R15, R7 change their color (from white to black). The aim of the task is to remember the order the black rectangles were presented and to click (mouse) on the correct rectangles.
My problem is now that I want to check for each rectangle, whether the clicked rectangles were clicked correctly and in the right order.
Mouse component: never end routine, save mouse state on click, clickable stimuli: recallR1, recallR2, … recallR16, store params: name
In the excel file corrAns = e.g. recallR4, recallR15, recallR7
I tried several solution in the code component (each frame) with multiple variations (mouse.isPressedIn, mouse.clicked_name etc.). Here is a code example:
if mouse.isPressedIn(recallR1) and corrAns == 'recallR1':
```thisExp.addData('corrR1', 1)```
else:
```thisExp.addData('corrR1', 0)```
if mouse.isPressedIn(recallR2) and corrAns == 'recallR2':
```thisExp.addData('corrR2', 1)```
else:
```thisExp.addData('corrR2', 0)```
Can anybody help me to solve my problem?