I have made some progress but needs some help in this
As explained above my experiment is very simple, a sound is presented and participant has to press either 'left' or 'right' key to respond, which ends the trial. In case if the participant want to re-hear the sound, he should press 'space', I have set up an inner loop 'trials_5', with empty conditions of 999 reps, so it can repeat the sound gets repeated if 'space' is pressed.
put something loike this in my Begin Expeirment component of the code
key_resp_3 = event.getKeys(keyList=['space', 'left','right'])
isCollecting = True
And in the each frame
if key_resp_3.keys == 'space':
continueRoutine = False # trial will run again
score = score + 1
wrongAnswer= wrongAnswer+ 1
continueRoutine = False
trials_5.finished = True
When I had excluded the code after first six lines that does the repetition part, it works fine. That is, it repeats the same trial, if I press 'space'.
When I included the whole code as above, it just plays all the trials one after another without waiting to take my response.
Can any body help?
The program was repeating if I press the space bar. However, when the