Howdy, Stranger!

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

Supported by

using variable to set new variable

Hello,

I am currently working on an experiment where my sketchpad presentation time is equal to:

var.fix3_duration= 3500-(var.response_time_rep_cible_1) -( var.fix1_duration)

so I put an inline script before my sketchpad with:

var.interm=var.response_time_rep_cible_1_mouse - var.fix1_duration

var.fix3_duration= 3500 -var.interm

I am setting the time in my sktechpad window as [var.fix3_duration].

However it is not working, I keep getting the message 'variable fix3.duration does not exist".

meanwhile, when I set the duration of my sktechpad to 1000 ms, I can see that both variable exist and change with each trial in my variables inspector (check images below).

I do not know how to resolve this issue, can anyone help please?

thank you!



Comments

  • Hi,

    Sketchpads are drawn in the prepare phase, the response is only generated in the run phase. Therefore, when you calculating durations and other variables for sketchpads, you can't use the current response. Instead, you have to ether use inline_scripts and draw canvasses manually (in the run phase), or use the feedback item. This one is essentially the same as the sketchpad item, but is drawn in the run phase.

    See here for more information: https://osdoc.cogsci.nl/3.3/manual/prepare-run/


    Eduard

    Buy Me A Coffee

  • Hi Eduard,

    Thank you, I switched from a sketchpad to a feeback item and it's working

    Thank you!

    Gabriella

Sign In or Register to comment.