Hi all,
I am using PsychoPy verison 2022.2.4. I have a section of my study where participants can cycle through some images to study. I based the code for it off this post. The images cycle fine, but the image size won’t update even though I’ve made a variable for it and told it to set every repeat in the builder. I also have my code component above the image component in the routine. However, outside of this one section, during the trials, the changes in image size works fine. I will provide the code below and a link to my .psyexp file. Any help would be greatly appreciated.
—Begin experiment—
current_image = None
DoNotRep = False
—Begin Routine—
if BlockNum != 3 or DoNotRep == True:
continueRoutine = False
studyPhase.finished = True
img_num = 0
else:
if studyPhase.thisN == 0:
img_num = 0
if current_image in wide_stims: ###not working
stim_size = (.75,.50)
else:
stim_size = (.50,.75)
current_image = stim_item[TRstims[img_num]]
—End Routine—
if BlockNum == 3:
if TRkey.keys == 'left':
img_num = max(0, img_num - 1)
continueRoutine = False
elif TRkey.keys == 'right':
img_num = min(9, img_num + 1)
continueRoutine = False
else:
studyPhase.finished = True
DoNotRep = True
JR_Thesis.psyexp (79.6 KB)