I'm working on a task that presents a pre-determined sequence of stimuli, followed by a message that says whether they gain or lose points for the participant. Earlier I had separate trials for 'gain' and 'loss' trials, but given that the order I need to present them in varies per participant, I think I have to use one trial type so that it can take a single item list as input.
However, while trying to convert the two trial types into one, I ran into a problem. I tried to determine the stimulus that is presented on the current trial and based on that, change the message that appears indicating gain or loss. The trial code is as follows:
/ stimulustimes = [0=expquaddle; 3000=result; 7000=clearscreen]
/ ontrialbegin = [
if ( picture.expquaddle.currentitemnumber >= 11 )
values.currentcsvalue = parameters.secondcsvalue;
else values.currentcsvalue = parameters.firstcsvalue;
/ timeout = 9000
Items 1 through 10 represent gain (coded in parameters.firstcsvalue), and items 11 through 20 represent loss (coded in parameters.secondcsvalue). At 3000 ms 'result' would then display the value of the stimulus as recorded by values.currentcsvalue. So I expected the program to display the value of the presented stimulus, however, it presented the value of the previous
stimulus instead. Is this the intended behavior, and is there a simple way to display this correctly? It's possible to split it up into two trials but that seems to defeat the purpose of having the /ontrialbegin function.