Group: Forum Members
Posts: 42,
Visits: 220
|
I'm having a problem getting the following if statement to change a value correctly. I want to check the random position variable, the last trial's response, and the random demand variable to assign the location of the next stimulus. All of the if statement conditions look correct in the log file but yet it does not pass as "true" and set the values accordingly. "/ontrialbegin = [if ((values.randomposition == 1) && (values.response == "patch1") && (values.randomdemand == "lowpatch1" )) {values.lownumbery = 40%; values.highnumbery = 60%}]"
Additionally I'm having similar problem but using an if statement to insert stimulus frames. An example is- /ontrialbegin = [if ((values.randomposition == 1) && (values.response == patch2) && (values.randomdemand == "lowpatch1")) {trial.patchtrial.setstimulusframe(focus, 1); trial.patchtrial.insertstimulusframe(choose, 1); trial.patchtrial.insertstimulusframe(highnumber, 1); trial.patchtrial.insertstimulusframe(blankpatch2, 1); trial.patchtrial.insertstimulusframe(patch1, 1); }]"
|