Counterbalance stimuli using conditional statements?


Author
Message
jm560@sussex.ac.uk
jm560@sussex.ac.uk
Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)
Group: Forum Members
Posts: 25, Visits: 208

 

Hi,

I am trying to make a script that has a lot of counterbalancing, because ofthis I need the locations of the various distractor stimuli to be dependent onthe trial type. I've been trying to do this with conditional statements butcan't get it to work. I've copied the relevant bits of script below (hopefully that's enough - I haven't changed the rest of the script yet so thought it would be more confusing to attach the whole thing). I'm trying to test it just on the h position of filler 1 but I would want to change v position too later. Any help/ suggestions of how else I could do this would be appreciated!


<text filler1>
/ items = ("H", "Z", "o", "M","K", "o")
/ fontstyle = ("Arial Black", expressions.letterfontsize, false,false, false, false)
/ txcolor = black
/ select =sequence
/ txbgcolor = darkgrey
/ hposition = [
 if (trialcode=trial.lowX1)values.hp2 else if(trialcode=trial.lowX2)values.hp3 else if (trialcode=trial.lowX3)values.hp4else if (trialcode=trial.lowX4)values.hp5
]
/ vposition = 1px * (display.canvasheight/2) - (values.p1distance/2) * expressions.ratio_pxpermm
</text>

<values>

/hp1 = 50%

/hp2 = 1px *(display.canvaswidth/2) + (values.p23horizontal/2) * expressions.ratio_pxpermm

/hp3 = 1px *(display.canvaswidth/2) + (values.p23horizontal/2) * expressions.ratio_pxpermm

/hp4 = 50%

/hp5 = 1px *(display.canvaswidth/2) - (values.p56horizontal/2) * expressions.ratio_pxpermm

/hp6 = 1px *(display.canvaswidth/2) - (values.p56horizontal/2) * expressions.ratio_pxpermm

/vp1 = 1px * (display.canvasheight/2)- (values.p1distance/2) * expressions.ratio_pxpermm

/vp2 = 1px *(display.canvasheight/2) + (values.p26vertical/2) * expressions.ratio_pxpermm

/vp3 = 1px *(display.canvasheight/2) - (values.p35vertical/2) * expressions.ratio_pxpermm

/vp4 = 1px *(display.canvasheight/2) + (values.p4distance/2) * expressions.ratio_pxpermm

/vp5 = 1px *(display.canvasheight/2) - (values.p35vertical/2) * expressions.ratio_pxpermm

/vp6 = 1px *(display.canvasheight/2) + (values.p26vertical/2) * expressions.ratio_pxpermm

</values>

 

<trial lowX1>

/ ontrialbegin =[trial.lowX1.insertstimulustime(list.distractorXl1.nextvalue,500);]

/ ontrialbegin =[values.distractor = list.distractorXl1.currentvalue;]

/ ontrialbegin = [

               if(contains(list.distractorXl1.currentvalue, "X")) values.category ="congruent";

    else if(contains(list.distractorXl1.currentvalue, "N")) values.category ="incongruent";

]

/ ontrialend =[trial.lowX1.resetstimulusframes(); ]

/ stimulustimes = [1=fixation;500=sequence (fixationcover, XLD1, filler1, filler2, filler3, filler4,filler5); 600=sequence (eraser1, eraser2, eraser3, eraser4, eraser5, eraser6)]

/ validresponse = ("J","I")

/ correctresponse =("J")

/ response = timeout(2000)

/ beginresponsetime = 500

</trial>


Thanks!




GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
jm560@sussex.ac.uk - 8 Years Ago
Dave - 8 Years Ago
jm560@sussex.ac.uk - 8 Years Ago
jm560@sussex.ac.uk - 8 Years Ago
                     + x [quote] [b] jm560@sussex.ac.uk - Thursday, September...
Dave - 8 Years Ago
                         + x [quote] [b] Dave - Thursday, September 7, 2017 [/b]...
jm560@sussex.ac.uk - 8 Years Ago
                             + x [quote] [b] jm560@sussex.ac.uk - Sunday, September...
jm560@sussex.ac.uk - 8 Years Ago

Reading This Topic

Explore
Messages
Mentions
Search