psychopy.org | Reference | Downloads | Github

My Text stimuli T isn't showing in three different positions

Problem
I’m following this tutorial found here Making many components (a visual search task) — Workshops for PsychoPy 2020 2020

Intended Outcome
And what I wanted to get to was the point in which there was one fixation cross in the centre of the screen, then 3 letter T’s at different positions

What I’ve done so far
I’ve copied the code (see mine below) and the builder set up as outlined in the tutorial, and added the necessary code components in the builder (again see below) yet I only have one T and it’s in the same location as the fixation cross, overlapping, rather than showing 3 T’s at positions below. I’ve set all units to norm and I’ve also tried updating the T’s position from constant through to change every frame, but there is no change. I have a feeling it’s not getting the position or updating the position correctly, but I’m not sure why

Could someone offer assistance or insight as to why my code isn’t working like the tutorials. Ideally I’d love to know how to do this purely by adding code components, to the builder, but I thought to begin with I should follow the tutorial and understand what is going on!

My python code creating a for loop

myXList = [-.5, 0, .5]
T_textlist =
for x in myXList:
T_text = visual.TextStim(win=win, name=‘T_text’,
text=‘T’,
font=‘Open Sans’,
pos=(0, 0), height=0.1, wrapWidth=None, ori=0.0,
color=‘white’, colorSpace=‘rgb’, opacity=None,
languageStyle=‘LTR’,
depth=0.0)

    T_textlist.append(T_text)

print(T_textlist)

Code components added to builder

in the’Begin Routine’ tab, type: for letter in myLetters:
letter.setAutoDraw(True)

Then in the ‘End Routine’ tab type:for letter in myLetters:
letter.setAutoDraw(False)

You seem to have an array of objects called T_textlist but you are Auto drawing an array called myLetters

Hi, Ah thank you for pointing that out! I feel like a bit of an idiot. I should have read my code more carefully. I’ll make the appropriate changes.

Kind regards,

Rob

Hi,

Thank you for the advice, I went through code line by line and found the position x was set to 0, changed it and it all worked.

Kind regards,

Rob