Group: Forum Members
Posts: 11,
Visits: 94
|
It is already hard to come up with a proper title for my question, but I try to do my best to explain my problem.
The goal is to display the participant three simulated games in which they take part, but no response from the participant is required (the computer makes the decision for them). Each game consists of two phases, invest and return, and the participant is asked to press a button to move to the next phase and to the next game. I have the amounts to be invested and returned in list elements, and use expressions element to calculate the other information displayed to the participant.
What I want to achieve is that in the surveypage's ontrialbegin element the list.nextvalue returns the next value for each game, but now it does it for each text element displayed (these text elements correspond to the phases invest and return), so the invest and return phases are not in sync. Any idea how to make this work or better implement this? I enter the relevant part of the script here:
<surveypage TGprime_trust_sp> / stimulusframes = [1 = play_t] / ontrialbegin = [values.invest=list.investlist.nextvalue; values.return=list.equitreturn.nextvalue; values.Agets=expressions.bothplayersget; values.Bgets=expressions.bothplayersget] / ontrialbegin = [values.game += 1] / caption = "Game <%values.game%>" / finishlabel = "Suivant" / showpagenumbers = false / showquestionnumbers = false </surveypage>
<surveypage TGprime_distrust_sp> / stimulusframes = [1 = play_t] / ontrialbegin = [values.invest=list.investlist.nextvalue; values.return=list.inequitreturn.nextvalue; values.Agets=expressions.playerAgets; values.Bgets=expressions.playerBgets] / ontrialbegin = [values.game += 1] / caption = "Game <%values.game%>" / finishlabel = "Suivant" / showpagenumbers = false / showquestionnumbers = false </surveypage>
<text play_t> / items = play_i / hjustify = left / size = (50%, 50%) / select = sequence </text>
<item play_i> / 1 = "You have sent <%values.invest%> euros to your opponent. When multiplied by three it makes <%expressions.multiple%> euros. Press Next to see your opponent's decision." / 2 = "Your opponent has decided to give you <%values.return%> euros. This means that you have now <%values.Agets%> euros, whereas your opponent keeps <%values.Bgets%> euros. Press Next to continue." </item>
<list investlist> / items = ("12", "18", "9") / selectionmode = sequence </list>
<list equitreturn> / items = ("14", "26", "8") / selectionmode = sequence </list>
<list inequitreturn> / items = ("4", "8", "2") / selectionmode = sequence </list>
<values> / endow = 20 / game = 0 / invest = "" / return = "" / Agets = "" / Bgets = "" </values>
<expressions> / multiple = values.invest*3 / bothplayersget = (multiple + (values.endow - values.invest))/2 / playerAgets = (values.endow - values.invest) + values.return / playerBgets = (multiple - values.return) </expressions>
|