OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): PsychoPy 2024.2.1post4
What are you trying to achieve?: vary the slider’s starting value each trial, start value defined in condition file.
What did you try to make it work?: I put the variable’s name as the Starting value (xaxis_empathy_start) of the slider’s component.
What specifically went wrong when you tried that?:
I received the following error message
NameError: name ‘xaxis_empathy_start’ is not defined
But when I displayed the variable as a text, it appeared on screen, so it is definitely defined.
Then I tried to define the startValue in the Begin Routine tab of the code component in the respective routine (empathy_slider.startValue = xaxis_empathy_start; also just as empathy_slider.MarkerPos) but then no marker appeared at all and when I tried to move it, the experiment aborted. And I don’t know if this is the correct way to define the startValue outside of the slider component.
One thing I noticed is that in other components for which I get no error putting variables names from my condition file, e.g., the movie component, I can actually set the respective variable to “set every repeat”. But there is no such option in the slider component for the Starting value. If this is the source of my problem, how can I go around it?