Group: Forum Members
Posts: 57,
Visits: 172
|
Hello!!!! I am writing a script that will have political honesty scores moving across the screen. The scores will either be one where the Republican party is more honest or the Democratic party is more honest. The participants will have to guess from the numbers seen on the screen which party is more honest. If they are wrong about what party scores are running across the screen, an error will appear.
So for example, if numbers run across the screen mean that the Rep party is more honest and the participant says that they are Rep then a correct signal would appear. However, if they assess wrong, an incorrect signal would appear.
For this correct and incorrect function, I want to create an if-then function where: if the scores are Democrat and the participants press the correct key then a correct signal will appear.
I did some research on the forums and found that an if-then statement can be done like this: trial mytrial> / ontrialbegin = [if (true) {trial.mytrial.setstimulustime(text.a, list.fixationduration.nextvalue); trial.mytrial.insertstimulustime(text.b, list.fixationduration.nextvalue); }] / ontrialend = [trial.mytrial.resetstimulusframes()] / stimulustimes = [0=fixation] / validresponse = (57) </trial>
However, I don't know if it will work for what I am trying to do. Could someone help me in forming an If-then statement when it pertains to error messages?
Thank you in advance!
|