Millisecond Forums

Two types of incorrect response

https://forums.millisecond.com/Topic14589.aspx

By Paul123 - 10/13/2014

Dear All,

I am trying to write a script where participants are asked to press one of four buttons and then they are shown a pair of pictures. Afterwards, I would like to give them feedback depending on the button that they pressed at the beginning of a trial ("keep a point" feedback if they press "k" button, "lose a point" feedback if they press "m" button and "incorrect button" if they press "a" or "z"). My script seems to work fine for "k" and "m" responses but I do not know how to include the feedback for incorrect buttons.
 
</trial 1>
 
/ validresponse = ("k","m")
/ correctresponse = ("m")
/ responsetime = 1001
/ inputdevice = keyboard
/ stimulustimes= [1  = FixationB; 1001 = Fixation50]
/ branch = (trial.1.correct, eq , 1,  neutralVSstimulus)
/ branch = (trial.1.correct, eq , 0,  neutralVSstimulus)
</trial>

<trial neutralVSstimulus>
/ response = timeout (3003) 
/ stimulustimes= [1 =ControlLeft2, StimulusRight2, xdat4;  2002 = blank,  xdat0]
/ branch = (trial.1.correct, eq , 1, WinPoint)
/ branch = (trial.1.correct, eq , 0,  LosePoint)
</trial>

<trial WinPoint>
/ response = timeout (3003) 
/ stimulustimes= [1 = WinPoint]
</trial>
<trial LosePoint>
/ response = timeout (3003) 
/ stimulustimes= [1 = LosePoint]
</trial>

Your help is highly appreciated!

Paul
By Dave - 10/13/2014

Schematically you simply do:

<trial mytrial>
/ validresponse = (ENTER SCANCODES FOR ALL FOUR KEYS)
...
/ branch = [if (trial.mytrial response == SCANCODE FOR K) trial.x]
/ branch = [if (trial.mytrial response == SCANCODE FOR M) trial.y]
/ branch = [if (trial.mytrial response == SCANCODE FOR A || trial.mytrial.response == SCANCODE FOR Z) trial.z]
</trial>
By Paul1234 - 10/13/2014

Hi Dave,
Thank you for your answer. I have used a similar solution before - I have branched four separate responses with four separate neutralVSstimulus trials. In my task neutralVSstimulus trial contains 5 picture pairs which were supposed to be presented without repetition regardless of the response given by participants. However, when I run the task I realised that some of the picture pairs were presented more than once. That is the main reason I used trial.mytrial.correct, command in order to make sure that each of the picture pairs is presented only once.

*** PICTURES ***
<item set1>
/ 1 = "l1a.jpg"
/ 2 = "l3a.jpg"
/ 3 = "l4a.jpg"
/ 4 = "l6a.jpg"
/ 5 = "l7a.jpg"
/ 6 = "l8a.jpg"
/ 7 = "l13a.jpg"
/ 8 = "l14a.jpg"
/ 9 = "l18a.jpg"
/ 10 = "l19a.jpg"
</item>
<item controlset1>
/ 1 = "l1b.jpg"
/ 2 = "l3b.jpg"
/ 3 = "l4b.jpg"
/ 4 = "l6b.jpg"
/ 5 = "l7b.jpg"
/ 6 = "l8b.jpg"
/ 7 = "l13b.jpg"
/ 8 = "l14b.jpg"
/ 9 = "l18b.jpg"
/ 10 = "l19b.jpg"
</item>

<picture StimulusRight1>
/ items = ("l1a.jpg","l3a.jpg","l4a.jpg","l6a.jpg","l7a.jpg")
/ position = (80, 50)
/ select= noreplace
</picture>
<picture ControlLeft1>
/ items = ("l1b.jpg","l3b.jpg","l4b.jpg","l6b.jpg","l7b.jpg")
/ position = (20, 50)
/ select = StimulusRight1
</picture>

<picture StimulusRight2>
/ items = ("l8a.jpg","l13a.jpg","l14a.jpg","l18a.jpg","l19a.jpg")
/ position = (80, 50)
/ select= noreplace
</picture>
<picture ControlLeft2>
/ items = ("l8b.jpg","l13b.jpg","l14b.jpg","l18b.jpg","l19b.jpg")
/ position = (20, 50)
/ select = StimulusRight2
</picture>
By Dave - 10/13/2014

> However, when I run the task I realised that some of the picture pairs were presented more than once. That is the main reason I
> used trial.mytrial.correct, command in order to make sure that each of the picture pairs is presented only once.

I fail to see what one has to do with the other. Whether a correct response is given or not / whether you use the trial.mytrial.correct property has no bearing per se on how stimuli are selected.
By Paul1234 - 10/13/2014

Ok, thank you  - I will give it a go once again.