+xIs there a way to change the color of each "|" to indicate rewarded vs. unrewarded trials? e.g. black for each rewarded trial and red for each unrewarded trial? Or should I do two counters, one for each? (If the latter, I can do this).
It's theoretically possible, but would be somewhat iffy to implement. If I were you, I'd go for separate rewarded vs unrewarded counters.
<values>
/ a_counter = ""
/ b_counter = ""
/ rewarded = false
</values>
<list rewardlist>
/ items = (true, true, true, true, true, false, false, false, false, false)
</list>
<trial a_or_b>
/ ontrialbegin = [
values.rewarded = list.rewardlist.nextvalue;
]
/ ontrialend = [
if (trial.a_or_b.response == "a") {
if (values.rewarded){
values.a_counter = concat(values.a_counter, "|");
} else if (!values.rewarded) {
values.a_counter = concat(values.a_counter, "<font color=#FF0000>|</font>");
};
} else if (trial.a_or_b.response == "b") {
if (values.rewarded){
values.b_counter = concat(values.b_counter, "|");
} else if (!values.rewarded) {
values.b_counter = concat(values.b_counter, "<font color=#FF0000>|</font>");
};
}
]
/ stimulusframes = [1=a, b, a_counter, b_counter]
/ inputdevice = mouse
/ validresponse = ("a", "b")
</trial>
<text a>
/ items = ("Deck A")
/ size = (18%, 40%)
/ txbgcolor = cadetblue
/ position = (40%, 50%)
/ erase = false
</text>
<text a_counter>
/ items = ("<%values.a_counter%>")
/ position = (40%, 10%)
/ erase = false
</text>
<text b>
/ items = ("Deck B")
/ size = (18%, 40%)
/ txbgcolor = cadetblue
/ position = (60%, 50%)
/ erase = false
</text>
<text b_counter>
/ items = ("<%values.b_counter%>")
/ position = (60%, 10%)
/ erase = false
</text>
<block example>
/ trials = [1-10 = a_or_b]
</block>
https://www.millisecond.com/support/docs/v6/html/language/markup.htm