variables related to keypress are a step late in sequence
in OSWeb
Hey guys!
I am doing a basic recognition memory test, where participants respond with a button press to visual stimuli.
In order to show each picture for the same amount of time, I want to deduct the RT of response from the specified time (3000 ms).
The issue is: it seems that i always access the RT from a cycle behind (using keyboard response and inline javascript - vars.response_time_ELEMENTNAME). On the first trial, the post-keypress scene never appears, then it appears for 3000 ms - previous RT, instead of actual RT.
Any help would be appreciated!
Comments
Hi @reichardtr ,
Could it be that you placed your JS code in the Prepare tab of your `inline_javascript` item? It should be in the Run phase.
Cheers,
Lotje
Did you like my answer? Feel free to

Unfortunately, not. It does not seem to influence this behavior whether the code is in prepare or run.
I added a logger before the JS script to make sure that the RT is saved before I try to access it, but it also doesnt seem to matter where this logger element is in the sequence.
Hi @reichardtr ,
Could you update your experiment here, so that we can take a look?
Cheers,
Lotje
Did you like my answer? Feel free to

Hey Lotje,
Meanwhile, I managed to solve the problem. The second presentation should have been a feedback element, bc the sketchpad is prepared before the trial starts so it uses variables from the previous cycle.
Thanks for your help though! :)
Ah, that makes sense! Thanks for letting us know!
Did you like my answer? Feel free to
