In the retrieval-instruct l the text ‘Press space to continue’ comes up and if the participant presses space it counts as a response in the first trail, which is then wrong since it requires different keys. I want to set the start time for the images and objects to come up after this response has been given. My thinking was that the text and response component will have a FINISHED line and I could put that into the start time for the objects and faces but since it waits for a response it does not have that in the code like other components that don’t wait for a response, therefore not sure how to fix it.
How are you collecting responses? If you use a keyboard component then you can set the keyboard response in the trial to only accept the relevant keys (i.e. not space) and you can also tick discard previous.
How would I be able to do that. Currently this is what the code for ‘press to continue’
theseKeys = key_resp_2.getKeys(keyList=[‘space’], ignoreKeys=[“escape”], waitRelease=False)
this is the trial response code, where i tried adding ‘space’ to the ignore = but it didnt change anything
theseKeys = response_keys.getKeys(keyList=[‘left’,‘right’,‘down’], ignoreKeys=[“escape”], waitRelease=False)
Are you using Builder with code components or just Coder?
Builder with code components
In that case why are you using a code component for your “press to continue” button, or are you showing compiled code?
Your keyboard components should look like this.
I had built the press to continue in builder the same way like you did above, and the issues occurred. I wanted to add some additional functions which had to be in the coder and so now the new code is more up to date than the builder, therefore i wanted to see if i could fix it in the code rather than in the builder
Hello
There is no cross-talk between Builder and Coder. It is a one-way route from Builder.
Best wishes Jens
Hello,
My supervisor managed to solve it by removing this loop which was ending the retrieval instructions prematurely and counting the space as a response in the task retrieval:
‘End routine if the participant presses the “space” key to confirm their selection’
*if 'space' in keys: # "Space" key to confirm the choice*
-
thisExp.addData('SelectedPosition', selected_index)*
-
continueRoutine = False # End the routine*
thank you for all your efforts!