OS: Win 10 PsychoPy version: v2021.2.3 Standard Standalone? If not then what?: Y What are you trying to achieve?: I want a real-time comment in response to activity on the slider.
What did you try to make it work?: I made 10 categories on a slider with labels 10 to 100. What I want is that if a participant is selecting for e.g., label 20, then on the left side of the screen, it displays 20, and on the right side, 80, i.e., subtract the selected response from the overall label i.e., 100. And it changes in a realtime if the participant changes the slider in the same trial.
I don’t know how to go about it (either using builder or coder). Please help with this. I need it in my experiment.
It’s working. Thank You!
Is there an option to avoid displaying decimal value (.0) from the values say 20.0after using “$100-mySlider.rating” code.
There’s one more thing. I need to display the slider value also (without any subtraction, i.e., displaying value 10 when participant select 10 on slider ) separately as text just like it appeared using the code “$100-mySlider.rating”.
The code $100-mySlider.markerPos is saying “set this to be 100 minus the value of my slider’s marker position”, to make another text component without the arithmetic you could just do $mySlider.markerPos.
For the decimal place, there’s a number of ways to control how many decimal places a number is displayed to, but for what you want the easiest way is just int(mySlider.markerPos) - which will convert it to an integer (aka a whole number)
I also want the last selected response on the slider to be available on the last slide of the same trial as feedback (what he/she selected on the earlier slide). Further, after 5 such trial loops, I need one final slide where it displays the average of all the last selected values on the slider across 5 trials (like ‘You won 60’ as one text which I get after code ‘$mySlider.markerPos’, and ‘Your opponent won 40’ as second text that I obtained after code ‘$100-mySlider.markerPos’). I meant the average of all the values that I got after applying these codes across 5 trial loops. Please help with it too.