Sequence item: Using a variable created in an inline javascript item for 'Run if'
in OpenSesame
Hello,
I am trying use a variable created in an inline javascript item (outcome) in the 'Run if' statement of a sequence item (trial_sequence).
I have attached screenshots of the inline javascript item and the sequence item.
Currently, the items with outcome in the 'Run if' (player_1_gain and player_1_loss) are never running.
I also tried 'outcome = 1' without the brackets, which had the same result, and 'vars.outcome', which had an error.
Please advise. Thank you in advance!
-Bar
Comments
Hi Bar,
Are you defining the outcome value in the run or prepare phase of that javascript item? If it is the run phase, try to put it in the prepare phase. And use [outcome]=1/0
Hope this helps,
Eduard