| Reference | Downloads | Github

End trial only when correct mouse click made?

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10):


PsychoPy version (e.g. 1.84.x):


Standard Standalone? (y/n) If not then what?:


**What are you trying to achieve?:

Hi all. I’m really new to PsychoPy and I’m currently using the Builder to make a task. Up until now I’ve always created my tasks in E-Prime.

I’m creating a touchscreen task for children whereby they are presented an image in the centre of the screen. Four other images are then presented (one in each corner) and then they have to click on which image they think matches the one in the middle. They aren’t given any feedback. I’ve created this without any issues, however, I also need to create some practice trials that give feedback. I need practice trials that:

  1. Only move onto the next trial once they’ve clicked the correct answer.
  2. Triggers an audio file (telling them they are correct) when they click the correct answer before moving onto the next trial.
  3. Triggers an audio file (telling them to try again) when they click on an incorrect response. They need to be able to keep trying until they click on the correct answer.

I have a conditions file that indicates which is the correct answer and the correct answer image will change in each trial.

I just wondered if anyone had any suggestions as to how I might be able to create this as I’ve failed to come up with any solutions.

Any suggestions would be greatly appreciated!

How do you currently implement the ending of the trial?

Hi Michael,

Currently with a valid mouse click. Clicks are possible on any of the four images presented in the corners of the screen.

OK, quick answers that might address two of your requests:

  1. Only specify one of your stimuli as a valid stimulus per trial. You already seem to have that variable in your conditions file, so for example you could put something like this in the “clickable stimuli” field of your Mouse component:
  1. The routine only ends with a valid click, so simply insert another routine after it that plays your “correct response” feedback sound, unconditionally.

  2. Will take a bit more thought and a snippet or two of custom code.

1 Like

Hi Michael! Apologies for the late response, been away from the desk for a while. These points have been really useful and will get on to figuring out how to integrate them. Thanks for the pointers!