Changing (removing) a text stimulus while the mouse is being tracked
I'm trying to realise the following design:
- per trial, a sentence gets displayed on a word-by-word basis
- each word gets displayed for a fixed amount of time (300ms)
- just as with the previous words, the last word disappears from the screen after that fixed period
- tracking of the mouse starts simultaneously with the last word of the sentence
As of now, I managed to get the first two points working (please feel free to have a look at the example experiment attached), but I'm struggling with the third. As you can see in the file, the mousetrap item is only able to start working its magic after the
clock.sleep has finished. In looking for a way to display the last word and start tracking in parallel, I found that mousetrap-os is not contained in the list of items compatible with coroutines. As a result, I’m stumped with how to proceed.
Seeing as this is my first time trying to use Python, I’m sure I’m missing something really obvious here. If anyone could point out to me how to go about doing this, I would much appreciate it!