Post by isatrn on Nov 11, 2023 12:23:47 GMT
Hi everyone !
I am trying to write a script corresponding to a delayed nonmatching to sample task. The task is as follows : "A target face is shown for 1 s, followed by a 4-s delay, after which the target face is shown together with a new face (distractor). Participants are asked to indicate the novel face and complete 44 trials".
My goal is that the two faces are chosen at random in each of the 44 trials, in an « all before repeat » way. The target face is first presented in the center of the screen for one second, the disappears, but after the 4s delay, i want it to be randomly in the left or the right part of the screen (with the novel face in the corresponding other side).
I tried to figure out a way to use a loop so that the coordinates of the target face and the distractor don’t overlap, but i can’t seem to make it work. This is what i tried, inspired by another post :
set $valid 0
set &&possible_x -100 100
set &&possible_y 0
while $valid == 0
set $coord_x &&possible_x use random
set $coord_y &&possible_y use random
if $coord_x != &old_x || $coord_y != &old_y
set $valid 1
fi
while-end
set &old_x $coord_x
set &old_y $coord_y
show bitmap @2 $coord_x $coord_y
I also still have to figure out how to show the same target face twice. It looks as if i want to ask for a random bitmap from a table, i can’t purposively ask for the same one later (after the 4s delay)?
I also wonder how to show the novel face randomly without it being the same face as the target face. I know that in a block, you can use « all before repeat », but is it possible to do the same within a table ? A colleague told me that it was possible but i didn’t find how to do it.
Thank you to anyone who took the time to read this post,
Isaline
I am trying to write a script corresponding to a delayed nonmatching to sample task. The task is as follows : "A target face is shown for 1 s, followed by a 4-s delay, after which the target face is shown together with a new face (distractor). Participants are asked to indicate the novel face and complete 44 trials".
My goal is that the two faces are chosen at random in each of the 44 trials, in an « all before repeat » way. The target face is first presented in the center of the screen for one second, the disappears, but after the 4s delay, i want it to be randomly in the left or the right part of the screen (with the novel face in the corresponding other side).
I tried to figure out a way to use a loop so that the coordinates of the target face and the distractor don’t overlap, but i can’t seem to make it work. This is what i tried, inspired by another post :
set $valid 0
set &&possible_x -100 100
set &&possible_y 0
while $valid == 0
set $coord_x &&possible_x use random
set $coord_y &&possible_y use random
if $coord_x != &old_x || $coord_y != &old_y
set $valid 1
fi
while-end
set &old_x $coord_x
set &old_y $coord_y
show bitmap @2 $coord_x $coord_y
I also still have to figure out how to show the same target face twice. It looks as if i want to ask for a random bitmap from a table, i can’t purposively ask for the same one later (after the 4s delay)?
I also wonder how to show the novel face randomly without it being the same face as the target face. I know that in a block, you can use « all before repeat », but is it possible to do the same within a table ? A colleague told me that it was possible but i didn’t find how to do it.
Thank you to anyone who took the time to read this post,
Isaline