Ending a coroutine with a keypress
Hi, I am interested in creating a stop-signal experiment very similar to the one here: https://github.com/smathot/opensesame_coroutines
I want a trial time limit, as included in the example, but what I want different is that the trial should also end if participants make a response, rather than running out to a deadline regardless of what they do. Wondering how I would go about doing this? Setting the coroutine duration to "keypress" did not work.
Thanks
Comments
Hi,
This takes a bit of scripting, but nothing too intimidating. You'll want to take a look at this discussion:
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Perfect. Thanks very much.
Hi, sorry to be a bummer but I'm still having a problem with this. I believe I have implemented as suggested in that thread, but I am getting what seems to be inconsistent behaviour. Sometimes the trial will terminate with a keypress, sometimes not. It always seem to work fine on the first trial, then intermittently.
I may be doing something wrong, but I can't figure it out. I am hoping you could have a look, Sebastiaan?
https://www.dropbox.com/s/6bki1kbmxma1ipc/stop-signal-task-coroutines-attempt.osexp?dl=0
Thanks again for your help.
HI LJGS,
Not sure whether it is the solution to your problem, but in the discussion Sebastiaan pointed you to, in the second
inline_script, the single lineitems['stop_signal_coroutines'].var.duration = 5000in it was placed in theprepare phaseof that script. YOu put it in therunphase. I don't really know how this could lead to intermittence, but maybe this will solve it?Eduard
Great, that seemed to work. Thanks Eduard