Hi everyone, I’m new on Psychopy and I’m still trying to figure it out the best way to do some stuffs. I’m currently trying to show 2 scenes with 6 gabor patches each one. (1 scene -> 2 seg blank -> 2 scene). I tried to add this code component:
stimuli,stimuli2 = gaborMaker()
for gabor in stimuli:
gabor.draw()
win.flip()
core.wait(2)
win.flip()
core.wait(1)
for gabor in stimuli2:
gabor.draw()
win.flip()
core.wait(2)
This works in desk, but doesn’t work in JS version. Checking the JS code I saw why, JS doesn’t allow these “win.flip” as easily as Python does. I guess the solution is creating the 6 gabors in the Builder, instead of Code Component and just use the Code Component to create the positions to finally “send them” to the Builder’s Grating Component. So, my question is hypoteticall, what can I do if sometime I need a variable amount of stimulies in each trial? I mean, now I just need 6, so I can create 6 gabor on the Builder, but what if that number change trought the trials? I can’t figure it out how to do it without use win.flip in a Code Component.
Thanks in advance