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 igt
options
bitmapdir stimuli
set &bank 2000
mouse on
bitmaps
instructions
win100
win50
fee250
fee50
button_a
button_b
button_c
button_d
button_a_dark
button_b_dark
button_c_dark
button_d_dark
choose_bar
collectmoney
fonts
arial 18
task igt
text align left
set $bankbefore &bank ## save the current amount in your bank
show bitmap button_a -300 125
show bitmap button_b -100 125
show bitmap button_c 100 125
show bitmap button_d 300 125
show bitmap choose_bar 0 250
show text &bank -225 -250 255 255 255
show text "Your money:" -390 -250
readmouse l 1 99999 range 1 4
show bitmap button_a_dark -300 125
show bitmap button_b_dark -100 125
show bitmap button_c_dark 100 125
show bitmap button_d_dark 300 125
set $decisiontime RT
clear 5
set $a under MOUSE_X MOUSE_Y
#################################################
## did people press left buttons (1,2) or right buttons (3,4)
if $a == 1 || $a == 2
set $ab 1 ## ab=1 means that people pressed a or b
set &bank increase 100
show bitmap win100 -175 -100
set $win 100
fi
if $a == 3 || $a == 4
set $ab 0
set &bank increase 50
show bitmap win50 -175 -100
set $win 50
fi
######################################################################
## did people get fee (1) or not (0) and press a or b?
set $fee_or_not &&fees remove random ## take random from the list of 1s and 0s
if $fee_or_not == 1 && $ab == 1
set &bank decrease 250
show bitmap fee250 175 -100
set $fee 250
fi
if $fee_or_not == 1 && $ab == 0
set &bank decrease 50
show bitmap fee50 175 -100
set $fee 50
fi
show bitmap collectmoney 0 250
readmouse l 9 999999
clear -1
show text &bank -225 -250
save $decisiontime $a $fee_or_not $bankbefore &bank $win $fee
block test
set &&feeset 1 0 ## a fee can be given (1) or not (0)
set &&fees &&feeset times 50 ## we need a set of 1s (50x) and 0s (50x)
message instructions
tasklist
igt 100 fixed
end
