Howdy, Stranger!

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

Supported by

[open] Reset (NA) response_* variable before next trial

edited November 2014 in OpenSesame

Hi everybody! :)

I am trying to implement a correction in case of a false response. If the participant hits the wrong key, the stimulus stays displayed, a red X indicating the error appears below, and the participant can correct the response.

Everything works fine, due to your great and intuitive prgramm! Thanks again for that!!!

However, the logger documents the response within the second chance (response_rsp_secondchance) and i don't know how to reset this response_* variable. Right now the last secondchance response is carried over to the next trials, even if the participant answers the next items correctly in the first trial.

Later analysis would be eased if the response_rsp_secondchance would be empty or NA when the seq_secondchance is not run.

run skp_blank "always"
run skp_stimulus "always"
run rsp_firstchance "always"
run seq_secondchance "[correct]=0"
run log "always"

and within the sequence "seq_secondchance":

run skp_stimulus_sc "always" #skp_stimulus with a red "X" added
run rsp_secondchance "always"

I hope you can help with that, too... :-P
thanks and best regards,

timo

Comments

  • edited November 2014

    Hi Timo,

    The easiest way to do this, is to introduce an inline_script item at the end of your trial sequence (make sure to insert is after your logger!). Then paste the following code into the Run phase:

    exp.set("response_secondchance", "NA")
    

    This will overwrite the current value for response_secondchance.

    Good luck!

  • edited November 2014

    Hi Edwin,
    thank you for responding so quick! :)

    Unfortunately it doesn't work here... Maybe you could help me to find my error.
    What are you referring to with "response_secondchance"? Is it the response item form my example (rsp_secondchance) or is "response_" a prefix by OpenSes and "secondchance" is the response item?

  • edited 9:39AM

    Ah, yes, sorry. I had assumed your keyboard_response item was called secondchance. The response_ bit is indeed inserted by OpenSesame.

    So in more generic terms, to overwrite the value for the item my_keyboard_response, use the following script:

    exp.set("response_my_keyboard_response", "NA")
    

    Does that help?

  • edited 9:39AM

    Unfortunately it does not. I'm suspecting this is my fault. :) response_rsp_trial_st still carries the last response throughout all trials...

    ...until the user needs a second trial again, and gives a different response
    So maybe you'd take a look at the screenshot below and this code snippet:

    exp.set("response_rsp_trial_st", "NA")
    

    Thank you for your time. I really appreciate it!

  • edited 9:39AM

    Hi @timo,

    I'm kind of out of ideas for this one. Maybe @sebastiaan can crack it?

    Sorry!

  • edited 9:39AM

    Hi Timo,

    Hmm, in principle this should work. Are you sure there isn't some trivial problem, such as a run-if statement preventing _inline_script from being executed? If not, perhaps you could upload the full script somewhere, for example to pastebin or http://gist.github.com.

    Cheers!
    Sebastiaan

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

Sign In or Register to comment.