Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Make the stimuli stay after the keypress

Hello,

I'm currently creating an online experiment using Opensesame. I'd like to make my images consistently show 1200ms (the image won't disappear if participants press the key within 1200ms). I referred to a previous discussion: https://forum.cogsci.nl/discussion/2750/how-to-make-the-blank-screen-stay-after-the-keypress. Then I programmed the experiment as follows:


sketchpad: image (duration = 0)

keyboard_response: timeout = 1200

inline_javascript: vars.timeLeft = 1200 - vars.response_time

sketchpad: image (duration = [timeLeft])


It works very well from the second trial to the last trial. However, during the first trial, the image still disappear when pressing the key. I checked the interval between trials and found the interval between trial1 and trial2 was different from others.


Does anyone know how to solve it? Thanks in advance!

Best,

MZ

Comments

  • I'm not sure but I assume that the inline script (run) is executed during the sequence but the duration of the sketchpad is computer before the sequence starts.

    I don't know how to solve it but maybe you could try with feedback_item instead of the sketchpad.

  • Hi,

    Have you tested this online? I've tried something similar and when I run the experiment online it no longer works. Just wondering if you've had the same issue. Thanks.

  • Hi @DionH ,

    I've tested it online and found that it works in the same way as running on Opensesame if I respond to every trial. However, for instance, if I do not respond to trial3, the image will disappear when pressing the key during trial4, but the image can last 1200ms again during trial5.

  • I don't know for sure, but it sounds that the comparison on trial 4 is done with information from trial 3, e.g. the start time is used from trial 3, like that on trial 4 the trial seems to last already for a long time, so that the response time on trial 4 seems to be longer as the your 1200 ms. So basically, you have to make sure that the timer starts in the beginning of every trial, independent of the keyboard response.

    Hope this helps,

    Eduard

    Buy Me A Coffee

Sign In or Register to comment.