Group: Administrators
Posts: 13K,
Visits: 104K
|
You simply set up 8 <text> elements, each displaying a different amount of money. Have participants click on one of the <text> elements and subtract the selected amount from their total:
<values> / total = 1000 / amount1 = 10 / amount2 = 25 </values>
<block myblock> / trials = [1-4=allocate] </block>
<trial allocate> / ontrialend = [if (trial.allocate.response=="amount1") values.total-=values.amount1] / ontrialend = [if (trial.allocate.response=="amount2") values.total-=values.amount2] / stimulusframes = [1=stimulus, amount1, amount2] / validresponse = (amount1, amount2) / inputdevice = mouse / branch = [trial.showmoneyleft] </trial>
<trial showmoneyleft> / stimulusframes = [1=total] / validresponse = (0) / trialduration = 1000 / recorddata = false </trial>
<text stimulus> / items = ("A", "B", "C", "D") </text>
<text amount1> / items = ("<%values.amount1%>$") / txbgcolor = grey / size = (5%, 0.05px*display.width) / position = (40%, 75%) / vjustify = center </text>
<text amount2> / items = ("<%values.amount2%>$") / txbgcolor = grey / size = (5%, 0.05px*display.width) / position = (60%, 75%) / vjustify = center </text>
<text total> / items = ("You still have <%values.total%>$") / position = (50%, 50%) </text>
|