Problem when trying to repeat specific trial until response is correct
For my experimental design participants self-initiate presentation of the stimuli using a self-paced key press, however when their response is incorrect the stimuli presentation becomes confusing, I will elaborate.
My experiment design is as follows
- Instruction screen
- Keyboard response to continue
- If pressed too soon (incorrect response), error canvas and returns to instruction screen
- Object presentation
- Fixation Dot
To stop the participants from rhythmically choosing to present when the instruction screen is shown, I have put in a preventative measure.
1) There is a randomised delay of up to 4000ms when the instruction screen is shown, which if the participant makes a keyboard response (incorrect), it brings up an error canvas for 2000ms then resets the sequence
Code for error variable
My problem is:
If the participants cause an error (keypress within the delay), it returns them to the start of the sequence as expected. However, following on from the reset if they do not cause an error (correct response) and the sequence continues as expected, it shows the object and fixation dot twice, before restarting the sequence. For example:
- Press too soon
- Displays error canvas, then returns to instructions
- Respond correctly
- Object display -> Fixation Dot -> Delay (x2 on all)
If they do not cause an error the sequence is as expected and everything works fine.
Here is my initial sequence and main inline script before I tried to use the in-built run if's
If anybody has a solution, suggestion, or a question, please let me know. Thank you! :)
also, thank you for the great software and a great platform to learn from!