|
Post by skaiste on Mar 23, 2021 16:04:14 GMT
Dear Psytoolkit experts,
Is it possible to randomly alternate two different tasks within a block: random typeA task on even trial numbers, random typeB task on odd trial numbers?
block iat_mixed set &combinedcounter 0 tasklist typeA 16 all_before_repeat typeB 16 all_before_repeat end
TypeA and typeB differ only by stimulus presented (that is, refered table). Simplified tasks look like this:
task typeA #or alternatively typeB table tableA #typeB refers to tableB keys a l show text @1 0 0 readkey @2 99999999 if STATUS == WRONG show text "x" 0 200 red fi save @1 RT STATUS
tableA stimA1 1 stimA2 1 stimA3 1 stimA4 1 stimA5 2 stimA6 2 stimA7 2 stimA8 2
tableB stimB1 1 stimB2 1 stimB3 1 stimB4 1 stimB5 2 stimB6 2 stimB7 2 stimB8 2
Very gratefull in advance for any advice, Skaiste
|
|
|
Post by skaiste on Mar 23, 2021 19:31:54 GMT
I also tried to avoid using table (following the task-switch example) but can not find how to define odd and even trials, as modulo oprator works only with surveys. Can someone suggest how to count remainder in psytoolkit syntax?
task typeA_typeB set $typeA random 1 8 set $typeB random 1 8 while $typeA == &previoustyppeA || $typeB == &previoustypeB #refer to bitmaps from 9 to 16 set $typeA random 1 8 set $typeB random 1 8 while-end set &previoustypeA $typeA set &previoustypeB $typeB set $typeBbitmap expression $typeB + 8 keys a l set $oddeven expression (TRIALCOUNT - 2 * (TRIALCOUNT / 2)) if $oddeven == 0 set %stimulus $typeA else set %stimulus $typeB fi show text %stimulus 0 0 white save KEY RT STATUS
|
|
|
Post by barbaraacker on Jun 5, 2024 18:06:47 GMT
Did you ever figure this out? I'm trying to do something similar.
|
|