Changing a value depending on the presentation of a specific stimulus-item


Author
Message
plush
plush
Guru (5.4K reputation)Guru (5.4K reputation)Guru (5.4K reputation)Guru (5.4K reputation)Guru (5.4K reputation)Guru (5.4K reputation)Guru (5.4K reputation)Guru (5.4K reputation)Guru (5.4K reputation)
Group: Forum Members
Posts: 57, Visits: 96
Dear Inquisit,

I am trying to change a value depending on the presentation of a specific stimulus-item. The code below however does not work. Any suggestions will be much appreciated.

Thanks!

------------------------------------------------------------------------------------------------------

<values>
/totalearnings = 0
</values>
<expressions>
/ totalearnings = format("%.2f", values.totalearnings)
</expressions>

<text totalearnings>
/ items = ("Total Points: <%expressions.totalearnings%>    ")
/ position = (70%, 82%)
/ valign = bottom
/ halign = left
/ erase = false
</text>

<trial outcomeleftbutton1>
/stimulustimes = [1=outcomeleftbuttontext1,totalearnings]
/timeout = 1000
/ ontrialend = [if(text.outcomeleftbuttontext1=="1 point") values.totalearnings+=1]
/ ontrialend = [if(text.outcomeleftbuttontext1=="5 points") values.totalearnings+=5]
</trial>

<text outcomeleftbuttontext1>
/ items = ("5 points","5 points","5 points","1 point","5 points","5 points","5 points","1 point")
/ select = noreplace
</text>

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Reading This Topic

Explore
Messages
Mentions
Search