Issue overlaying movie stimulus with multiple polygons and feedback

OS (e.g. Win10): Mac OS Catalina
PsychoPy version (e.g. 1.84.x): latest
Standard Standalone? (y/n) yes
What are you trying to achieve?:

Hello! In my experiment I’m showing participants a movie stimulus and asking them to click on specific moments of the movie clip. I’m tracking this with a mouse component and transparent polygons (clickable stim) at the moments of interest, to see if the participants click on them or not. On top of this, I want to give my participants live feedback (i.e. while the movie is playing) on whether they are correct or not (with code). I am running into a few issues which I outline below.

What did you try to make it work?:

  1. I first tried using a loop to set the polygons but the trial loop necessarily encompasses the movie stim too and I only want it to play once (one movie clip/multiple polygons). Also, a loop would only allow me to set one polygon at multiple moments - so it would be hard to tell from the data which polygon is clicked (as it would have the same name)

  2. I then tried bypassing the loop idea by creating individual polygon components for every moment of interest but it is messy for two reasons:

  • the data output for mouse.clicked_name shows ALL the names of polygons (all clickable stimuli - shown below) even when I have only clicked on one of the polygons, so this really gives me no indication of what participants have clicked on. Is this an error? or is there a way to only get the name of the polygon that has been clicked on?

  • I assumed this could be resolved and tried the feedback code shown below (note that the data output of the mouse.clicked_name gives me one row with a long string of names as shown above). I used ‘object.contains(mouse)’ since ‘mouse.isPressedIn’ doesn’t work online (and I will eventually be running this study online). However, the issue with ‘object.contains(mouse)’ is that the feedback cannot be given immediately, since of course ‘mouse.clicked_name’ can only be checked once the whole movie has played.
if pol1.contains(mouse1):
msg= "Correct!"
msgcolor= "green"
msg= "Incorrect!"
msgcolor= "red"

My two main questions are: how can I only see the name of the polygon that has been pressed in my output file? And is there a way for me to display the feedback on the screen immediately after participants have clicked the mouse (i.e. while the movie is playing?). If anyone sees another, more intuitive way or achieving what I’m trying then I also welcome new approaches.

Here is a simplified image of my experiment.

Thankful in advance for any help!

Hello! The rest is not important as i’m looking for another way to solve the issue but one thing that persists and that I don’t understand is why ‘mouse.clicked_name’ returns a list of ALL clickable stimuli instead of the ones that have been clicked.

For example when I click on pol1 and pol2 but not pol3 my output file looks like this. Any idea on how to solve this? it makes it impossible to know what the participant is clicking on. Thank you!!

Screen Shot 2021-01-22 at 11.05.43 AM

My mouse component looks like this: