Hi Jeremy,
I am having difficulty figuring out how to wait() on a specific condition. Basically I have a long audio file playing in my study. At random times, it pauses and the participant has to answer a question in the form of choosing from 3 images in a selector. Then the audio immediately resumes. If they take more than 30 seconds, the audio will resume and no response is recorded. I am having difficulty figuring out the logic to this “wait,” as I want to wait on the selector OR 30 seconds. This is what I have so far, which I feel like is close, but is not working for the 30 seconds part (only the selection):
newTimer("waitSelector", 30000)
.start()
,
newSelector("images").add( getImage("on"), getImage("mid"), getImage("off"))
.log()
.wait(getTimer("waitSelector").test.running() && !getSelector("images").test.selected())
,
Here’s my demo link if that will help: https://farm.pcibex.net/r/PRLnQL/
Thanks,
Sam