Hi I’m trying to do a simple thing but without success.
Stimuli are displayed in a loop and after each stimulus a slider appears. I want its position to change randomly (3 states): (0, -350), (120, -350), (-120, -350) (in pixels).
At first I added an excel file with the ‘location’ variable but it didn’t pick up the variable.
After reading other people’s questions I wrote in the code (in begin routine):
posM = (0, -350)
posR = (120, -350)
posL = (-120, -350)
locs = (posM, posR, posL)
shuffle(locs)
thisExp.addData(‘locs’, locs)
Is the code correct? What should I write in ‘position’ in the slider?
Thanks!
It seems that the Slider is still bugged when it comes to setting the Position-parameter. As soon as you set the Position-parameter to “set every repeat” from constant, the position will be set to [0,0], no matter what you want it to be. You can check this by looking at the compiled Python script.
Thanks for the response!
We have not reached a solution yet.
We tried to think of another way - we added 3 sliders with different positions, and in the code we wrote that only one would appear in each routine.
However, the three sliders appear together.
We would appreciate it if you have an idea what is wrong in the code,
Thanks!