Display slider value as starting point in the next routine/slider

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Mac):
PsychoPy version (e.g. 2.3.x):
Standard Standalone? (y/n) If not then what?:
What are you trying to achieve?:
I want to use participant’s rating in the first slider (prior belief) as a starting point in the second slider which measures posterior belief.
What did you try to make it work?:
First attempt: I used the “slider1.getRating()” variable or “$slider1.getRating()” in the starting value field of the slider component.
Second attempt: I added a code component in the first slider and I created a variable slider1_value =0 in the begin experiment (and begin routine) and I updated the value in the end routine slider1_value = slider1.getRating. Then I used the slider1_value variable in the starting value field of the slider component.
What specifically went wrong when you tried that?:
In both attempts, the marker was absent initially and appeared only after I clicked on the scale.

slider_pos_demo.psyexp (25.0 KB)
Hi there, here’s a demo that should do the trick. I’ve used .startValue to present the marker and place a fixation cross between the two routines to distinguish between the pre and post sliders

It works! Thanks a lot!
I was not aware of the startValue function which is so useful.