Post by reed on Jan 6, 2022 21:25:28 GMT
I'm doing an experiment in which participants are shown 8 words during the study phase. At the test phase, they are then shown 16 words, half of which are targets from the original list, and half of which are lures. Participants need to identify not only which words are correct, but the correct order in which they saw the original words.
In order to accomplish this, I've set it up so that participants can click on one of the potential words, and then click on one of 8 different locations to move it. This way participants can answer in whatever order they want, so there's no confound of output effects.
The problem I'm having is that I don't want participants to be able to either move the same word more than once, or place multiple words in the same stimuli location. To avoid this, I've tried to program in the range of acceptable stimuli for the readmouse command as an array, and have user responses removed from the array. Problem is, while I can't see any issue in the code itself, and it compiles and runs just fine, it's not locking out already-used words and locations as desired.
My code is below:
Any thoughts on what's going wrong?
In order to accomplish this, I've set it up so that participants can click on one of the potential words, and then click on one of 8 different locations to move it. This way participants can answer in whatever order they want, so there's no confound of output effects.
The problem I'm having is that I don't want participants to be able to either move the same word more than once, or place multiple words in the same stimuli location. To avoid this, I've tried to program in the range of acceptable stimuli for the readmouse command as an array, and have user responses removed from the array. Problem is, while I can't see any issue in the code itself, and it compiles and runs just fine, it's not locking out already-used words and locations as desired.
My code is below:
set &&stimRange range 9 24 #set array for word stimuli
set &&testRange range 1 8 #set array for target location stimuli
set $orderCount 1 #define counter variable for while loop
while $orderCount < 9 #begin while loop, 8 trials total
readmouse l 1 10000 range &&stimRange #allow users to select a stimulus in the acceptable range
set $m1 UNDER_MOUSE #record selected stimulus
readmouse l 1 10000 range &&testRange #allow users to select a target location for the stimulus
set $m2 UNDER_MOUSE #record target location for the stimulus
if $m2 == 1 #if stimulus target is location 1, move stimulus to location 1
relocate $m1 -300 -100
fi
if $m2 == 2 #if stimulus target is location 2, move stimulus to location 2
relocate $m1 -100 -100
fi
if $m2 == 3 #if stimulus target is location 3, move stimulus to location 3
relocate $m1 100 -100
fi
if $m2 == 4 #if stimulus target is location 4, move stimulus to location 4
relocate $m1 300 -100
fi
if $m2 == 5 #if stimulus target is location 5, move stimulus to location 5
relocate $m1 -300 -50
fi
if $m2 == 6 #if stimulus target is location 6, move stimulus to location 6
relocate $m1 -100 -50
fi
if $m2 == 7 #if stimulus target is location 7, move stimulus to location 7
relocate $m1 100 -50
fi
if $m2 == 8 #if stimulus target is location 8, move stimulus to location 8
relocate $m1 300 -50
fi
set &&stimRange remove $m1 #remove selected stimulus from range of acceptable stimuli
set &&testRange remove $m2 #remove selected target from range of acceptable targets
save $m1 $m2 RT #save participant responses and RT for each selection
set $orderCount increase #increase the counter for the while loop
while-end #break the loop
Any thoughts on what's going wrong?