How to create a visual search paradigm?

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

OS (e.g. Win10): Win 11
PsychoPy version (e.g. 1.84.x): 2023.2.2
Standard Standalone? (y/n) If not then what?:y
What are you trying to achieve?:
Random triangles and triangles with line segments, just like this
But in my program, triangles and line segments are separate, and the attempt cannot occur more than once

What did you try to make it work?:

What specifically went wrong when you tried that?:
Include pasted full error message if possible. “That didn’t work” is not enough information.

I think that you just need to change the horizontal positions of your polygons. It might take a little trial and error but you could subtract .05 from the x coordinate of the lines.

I use code component

I think that looks okay. What about the bit of the code where you set the line positions?

for i in StimPos:

Use HlinePos as the variable to represent the coordinates of the line