How can you draw with the brush but stop when mouse not pressed

Hey! I’m quite new to PsychoPy, so excuse me if this is a dumb question :slight_smile:

OS (e.g. Win10): Win11
PsychoPy version (e.g. 1.84.x): 2023.2.3
Standard Standalone? (y/n) yes
What are you trying to achieve?: I added a picture and want participants to draw in the picture, but only when their mouse is pressed. Currently, the brush does not stop drawing.

What did you try to make it work?:
I have an image, a brush component and custom code. Here are some pictures:


in the brush component (name: PictureQ1_1Brush), the starting condition is $brushconditionQ1

What specifically went wrong when you tried that?: The brush simply does not stop drawing, there is no error message

Hi! I am new too. I am trying to create an experiment where participants will see 12 unique line lengths and then I will add the brush function so that they could reproduce the lines. I was wondering if you could solve this.

No, I haven’t found a solution yet :confused: