How to use
This is the main source code for the experiment. If you want to use it, you should copy the actual zip file to your own PsyToolkit account, because often there are other files included for stimuli.
The source code for mentalrotation
options
window
mouse on
escape
bitmapdir stimuli
bitmaps
instructions
instruction2
correct
incorrect
training
readyforreal
thatwasit
# now the actual stimuli
target1
target2
target3
target4
target5
target6
target7
target8
target9
target10
target11
target12
target13
target14
target15
correct1
correct2
correct3
correct4
correct5
correct6
correct7
correct8
correct9
correct10
correct11
correct12
correct13
correct14
correct15
wrong1
wrong2
wrong3
wrong4
wrong5
wrong6
wrong7
wrong8
wrong9
wrong10
wrong11
wrong12
wrong13
wrong14
wrong15
fonts
arial 20
# the table contains the objects of each trial. But the exact
# positioning of the screen is determined randomly in the task itself
table rotationtable
target1 correct1 wrong1
target2 correct2 wrong2
target3 correct3 wrong3
target4 correct4 wrong4
target5 correct5 wrong5
target6 correct6 wrong6
target7 correct7 wrong7
target8 correct8 wrong8
target9 correct9 wrong9
target10 correct10 wrong10
target11 correct11 wrong11
target12 correct12 wrong12
target13 correct13 wrong13
target14 correct14 wrong14
target15 correct15 wrong15
task rotate
table rotationtable
# the next line is part of randomizing where the correct object
# will be
set $x random 0 1 # will the correct one be left (0) or right (1)
draw off
show bitmap @1 0 -150
if $x == 0 # if left, then show the correct one left
show bitmap @2 -250 150
show bitmap @3 250 150
fi
if $x == 1 # if left, then show the correct one right
show bitmap @2 250 150
show bitmap @3 -250 150
fi
show bitmap instruction2 300 -200
draw on # show all bitmaps at the same time
readmouse l 2 20000
if STATUS == CORRECT
show bitmap correct 0 200
fi
if STATUS != CORRECT
show bitmap incorrect 0 200
fi
delay 2000
clear 1 2 3 4 5
save BLOCKNAME TABLEROW $x RT STATUS
message instructions
message training
block training
tasklist
rotate 5 fixed
end
message readyforreal
block test
tasklist
rotate 10 fixed
end
feedback
text align left
set &PercCorrect perc ; select c5 == 1
set &RTCorrect mean c4 ; select c5 == 1
text -200 -100 &PercCorrect ; prefix "Percentage correct (in second block): "
text -200 0 &RTCorrect ; prefix "Average time per puzzle: "
text -200 100 "Press space to continue."
end