If this template helps then use it. If not then just delete and start from scratch.
OS (e.g. Win10): Win 10
What are you trying to achieve?:
I’m trying to make two stimuli move according to the key I give. Specifically, they will approach to each other. What I want is both of them to stop when those two stimuli meets. However, currently person2 keeps going right until the end, and image2(in the green condition) also keeps going left until the end.
This is what I have inserted in the code component
You really need to avoid absolute paths and shift to using relative ones.
Regardless, don’t use Windows-style \ separators, they can have special meaning in Python strings. Use / instead.
Your stimuli are doing exactly what your code tells them to do (keep moving in response to keypresses). If you want them to stop at some point, you need to include the constraints in the code. e.g. don’t increment the x coordinate if it exceeds some boundary value.