B.D.5
December 2, 2021, 1:30pm
1
OS (e.g. Win10): win10
PsychoPy version (e.g. 1.84.x): v2021.1.2
Standard Standalone? (y/n) If not then what?:y
What are you trying to achieve?:
I want to present an image after the participant respond to a slider
What did you try to make it work?:
What should I write as end time for the slider
What should I write as the start time for the image
What specifically went wrong when you tried that?:
Include pasted full error message if possible. “That didn’t work” is not enough information.
When I looked at the participant data slider.stopped is not defined. when I write this to the condition $slider.stopped error comes up
In python code it is like this:
Try slider.getRating() or slider.rating
B.D.5
December 2, 2021, 10:17pm
4
I also tried all other variables related to the slider but neither is worked.
Should I add a condition in the excel file?
You could try setting a flag, e.g.
sliderStarted = False
in Begin Routine
Then in Each Frame try
if slider.getRating:
sliderStarted = True
Then Ouse sliderStarted as the component start condition.
B.D.5
December 3, 2021, 10:13am
6
Begin Routine:
sliderEnded = False
Each Frame
if slider.getRating: #tried also with () and for slider.rating
sliderEnded = True
Set slider component end time as sliderEnded. (or left it empty)
Set image component start time as: sliderEnded
However, this resulted in the image appearing on the screen forever.
Did the image appear on screen when the slider was touched?
The slider end time should be blank
The imager end time should be a fixed number of seconds.
1 Like
B.D.5
December 3, 2021, 11:51am
8
wakecarter:
seconds
What about a mouse click? If I want to present a text componenet after a mouse click, what should be the start time for the text
B.D.5
December 3, 2021, 11:53am
9
Also, I ask participants to click the image component after the slider response. Should I set end time of the image as the offset of the mouse click?
Hi B.D.5, did you manage to find a solution to this in the builder? I am also trying to set up my experiment so that an image pops up after a response on the slider is selected.
B.D.5
April 19, 2022, 5:09pm
13
Hey Gillian,
Please try the attached method. I hope it helps.
Bests
untitled.psyexp (7.1 KB)
Uploading: download.png…