Group: Forum Members
Posts: 12,
Visits: 54
|
Hello,
In my experiment, participants will hear a sound clip with a scream and in the middle of the scream, there will be a control question where a number is played. After the scream trial, participants will be asked a control question and they have to enter the number they heard. At the same time, I will be keeping a tally of the number of coins participants have left. When participants get the number incorrect, I would like them to get notified that they will lose two coins, and I would like their "coins_left" value to subtract two. Is this possible?
Below is my relevant code
<sound scream1> / items = ("one_new.mp3") / select = replace / erase = false / volume = 0 </sound>
<sound scream2> / items = ("two_new.mp3") / select = replace / erase = false / volume = 0 </sound>
<sound scream3> / items = ("three_new.mp3") / select = replace / erase = false / volume = 0 </sound>
<textbox controlQ1> / caption = (controlQ) / correctresponse = ("1") </textbox>
<textbox controlQ1> / caption = (controlQ) / correctresponse = ("2") </textbox>
<textbox controlQ3> / caption = (controlQ) / correctresponse = ("3") </textbox>
<block waldo1> / onblockbegin = [ values.attempts_left = 3; values.circle_x = -10%; values.circle_y = -10%; ] / timeout = 7000 / trials = [ 1=clip_first; ] / bgstim = (scream1) </block>
<block waldo2> / onblockbegin = [ values.attempts_left = 3; values.circle_x = -10%; values.circle_y = -10%; ] / timeout = 7000 / trials = [ 1=clip_first; ] / bgstim = (scream2) </block>
<block waldo3> / onblockbegin = [ values.attempts_left = 3; values.circle_x = -10%; values.circle_y = -10%; ] / timeout = 7000 / trials = [ 1=clip_first; ] / bgstim = (scream3) </block>
<values coins> / coins_left = 130 </values>
<text how_many> / items = ("You have <%values.coins_left%> coin(s) left. How many coins do you want to bet?") / fontstyle = ("Lucida Grande", 3.11%, true, false, false, false, 5, 0) / position = (30,15) </text>
<surveypage bet> / questions = [1=bet_radiobuttons] / showpagenumbers = false / showquestionnumbers = false / stimulustimes = [1=how_many, 1coin, 10coins; 2000=reminder] / recorddata = true / ontrialend = [ values.coins_left-=radiobuttons.bet_radiobuttons.response; ] </surveypage>
expt questionnaires> / blocks = [1=waldo1; 2=controlQ1 3=waldo2; 4=controlQ2 5=waldo3; 6=controlQ3]
|