Post by emmamelanson on Jan 10, 2021 17:03:51 GMT
Hello all,
I am creating a task where subjects use a likert scale to rate an image but I'm having trouble using bitmap-under-mouse in my experiment because I have overlapping stimuli.
I want the mouse click to read only for bitmap from the range 5 to 12, and therefore I also want to exclude bitmap number 4 (the line under the circles from my likert scale) when getting the bitmap number of the bitmap that was clicked.
I keep getting an error on one line of code in which I use set "set $btmpnumber bitmap-under-mouse range 5 12" saying that range is an unknown variable.
Do anyone spot the mistake in this?
Here is my code.
Thanks!
Emma
options
mouse on
fullscreen
resolution 1200 700
fonts
small arial 20
big arial 40
bitmaps
Picture1
ring
clicked
line
task ratings
font big
show text "+"
delay 500
clear screen
font small
draw off
show bitmap Picture1 0 -100 #1 bitmap of couple
show text "scale title" 0 175 #2
show text "scale statement" 0 215 #3
show bitmap line 0 275 #4 scale straight line
show bitmap ring -525 275 #5 emtpy circle that can be clicked
show bitmap ring -375 275 #6
show bitmap ring -225 275 #7
show bitmap ring -75 275 #8
show bitmap ring 75 275 #9
show bitmap ring 225 275 #10
show bitmap ring 375 275 #11
show bitmap ring 525 275 #12
draw on
readmouse l 1 60000 range 5 12 # wait for left mouse click on a circle
set $btmpnumber bitmap-under-mouse range 5 12 # which bitmap was clicked, excluding the line bitmap beneath ## this is the problematic line!!!
set $scale expression $btmpnumber - 4 # determine scale score
##
## now draw filled stimulus on the selected bitmap
set $xcoord expression ( $scale - 1 ) * 150 - 525 # determine X position of clicked bitmap
show bitmap clicked $xcoord 275
delay 1500
clear screen
save $scale RT $btmpnumber $scale $xcoord
delay 1000
block test
tasklist
ratings 4
end
I am creating a task where subjects use a likert scale to rate an image but I'm having trouble using bitmap-under-mouse in my experiment because I have overlapping stimuli.
I want the mouse click to read only for bitmap from the range 5 to 12, and therefore I also want to exclude bitmap number 4 (the line under the circles from my likert scale) when getting the bitmap number of the bitmap that was clicked.
I keep getting an error on one line of code in which I use set "set $btmpnumber bitmap-under-mouse range 5 12" saying that range is an unknown variable.
Do anyone spot the mistake in this?
Here is my code.
Thanks!
Emma
options
mouse on
fullscreen
resolution 1200 700
fonts
small arial 20
big arial 40
bitmaps
Picture1
ring
clicked
line
task ratings
font big
show text "+"
delay 500
clear screen
font small
draw off
show bitmap Picture1 0 -100 #1 bitmap of couple
show text "scale title" 0 175 #2
show text "scale statement" 0 215 #3
show bitmap line 0 275 #4 scale straight line
show bitmap ring -525 275 #5 emtpy circle that can be clicked
show bitmap ring -375 275 #6
show bitmap ring -225 275 #7
show bitmap ring -75 275 #8
show bitmap ring 75 275 #9
show bitmap ring 225 275 #10
show bitmap ring 375 275 #11
show bitmap ring 525 275 #12
draw on
readmouse l 1 60000 range 5 12 # wait for left mouse click on a circle
set $btmpnumber bitmap-under-mouse range 5 12 # which bitmap was clicked, excluding the line bitmap beneath ## this is the problematic line!!!
set $scale expression $btmpnumber - 4 # determine scale score
##
## now draw filled stimulus on the selected bitmap
set $xcoord expression ( $scale - 1 ) * 150 - 525 # determine X position of clicked bitmap
show bitmap clicked $xcoord 275
delay 1500
clear screen
save $scale RT $btmpnumber $scale $xcoord
delay 1000
block test
tasklist
ratings 4
end