Reshow instructions if fail instruction check


Author
Message
Paige Kemp
Paige Kemp
Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)
Group: Forum Members
Posts: 20, Visits: 84
Hello, I want to reshow my instruction pages if participants fail the instructional check questions. However, I am happy problems looping back to the beginning of the trial to show the instructions. My "branch" back to the beginning of the does not work at all the program just continues to the following trials. It's highly likely that I have just coded the "branch" wrong. I have included my code below and 
Specifically: the code in INSTRUCTION COMPREHENSION CHECK PART 1: <surveypage HapInstrCompQ> 
INSTRUCTION COMPREHENSION CHECK PART 2: <surveypage FamInstrCompQ>
Thank you for your help.
-----------------------------------------------------------------------------------------
TITLE
Experiment 1 - Face Recognition
------------------------------------------------------------------------------------------

DEFAULTS

<defaults>
/ fontstyle = ("Arial", 20pt)
/ screencolor = white
/ txcolor = black
/ halign = center
/ canvassize = (100%, 100%)
/ windowsize = (100%, 100%)
</defaults>

<values>
/ instructnum = 1
/ trialCount = 0
/ CB = "NA"
/ group = "NA"
/ race = "NA"
/ face = "NA"
/ makeHappiness = 0
/ missHappiness = 0
/ makeFams = 0
/ missFams = 0
</values>

<parameters>
/ nBlocks = 4
/ nTrials = 60
/ nTest = nTrials
/ ISI = 500
</parameters>

<expressions>
/ instructnum = if (contains(script.currenttrial, "Instructions")){values.instructnum} else {"NA"}
/ trialCount = if(script.currentblock == "Happiness") {values.trialCount} else {"NA"}

/ race = if(script.currenttrial == "makeHappiness") {values.race} else{ "NA"}
/ face = if(script.currenttrial == "makeHappiness"){values.face} else{"NA"}

/ makeHappiness = if(script.currenttrial == "makeHappiness"){values.makeHappiness} else {"NA"}
/ missHappiness = if(script.currenttrial == "makeHappiness"){values.makeHappiness} else {"NA"}


/ makeFams = if(script.currenttrial == "makeFams"){values.makeFams} else {"NA"}
/ missFams = if(script.currenttrial == "makeFams"){values.missFams} else {"NA"}
</expressions>

------------------------------------------------------------------------------------------
<expt CB1>
/ onexptbegin = [if (computer.platform != "mac" && computer.platform != "win") script.abort()]
/ onexptbegin = [values.CB = 1]
/ groupassignment = groupnumber
/ blocks = [1=Welcome; 2=Happiness; 3 = Familiarity]
</expt>

------------------------------------------------------------------------------------------
****** DATA
------------------------------------------------------------------------------------------
<data>
/ file = "Face Recognition.iqdat"
/ separatefiles = true
/ labels = true
/ columns = [subject, group, date, time, blockcode, trialcode, response, latency,
            expressions.race, expressions.makeHappiness, expressions.missHappiness, expressions.face, expressions.makeFams, expressions.missFams]
</data>

------------------------------------------------------------------------------------------
****** BLOCKS
------------------------------------------------------------------------------------------

<block Welcome>
/ trials = [1 = Instructions]
</block>

<block Happiness>
/ onblockbegin = [values.instructnum = 2; values.trialCount = 0; values.makeHappiness = 1]
/ trials = [1-3 = Instructions; 4 = HapInstrCompQ; 5-15 = sequence (makeHappiness, NextTrial)]
/ onblockend = [values.missHappiness = 0]
</block>

<block Familiarity>
/ onblockbegin = [values.instructnum = 5; values.trialCount = 0; values.makeFams = 1]
/ trials = [1-3 = Instructions; 4 = FamInstrCompQ; 5-63 = sequence (makeFams, NextTrial)]
/ onblockend = [values.missFams = 0]
</block>

------------------------------------------------------------------------------------------
****** TRIALS        
------------------------------------------------------------------------------------------

<trial NextTrial>
/ inputdevice = mouse
/ stimulusframes = [1 = clearscreen, NextButton]
/ validresponse = (NextButton)
/ posttrialpause = parameters.ISI
</trial>

<trial makeHappiness>
/ inputdevice = mouse
/ ontrialbegin = [values.trialCount += 1]
/ stimulusframes = [1 = clearscreen, HappinessQuestion, Hap1, Hap2, Hap3, Hap4, Hap5, Hap6, 1, 2, 3, 4, 5, 6, faces_block1]
/ trialduration = 5000
/ validresponse = (1, 2, 3, 4, 5, 6, Hap1, Hap2, Hap3, Hap4, Hap5, Hap6)
/ ontrialend = [values.face = picture.faces_block1.currentitem;
                 if (trial.makeHappiness.response == "Hap1" ||trial.makeHappiness.response == "1") {values.makeHappiness = 1;}
                 else if (trial.makeHappiness.response == "Hap2" ||trial.makeHappiness.response == "2") {values.makeHappiness = 2}
                 else if (trial.makeHappiness.response == "Hap3" ||trial.makeHappiness.response == "3") {values.makeHappiness = 3}
                 else if (trial.makeHappiness.response == "Hap4" ||trial.makeHappiness.response == "4") {values.makeHappiness = 4}
                 else if (trial.makeHappiness.response == "Hap5" ||trial.makeHappiness.response == "5") {values.makeHappiness = 5}
                 else if (trial.makeHappiness.response == "Hap6" ||trial.makeHappiness.response == "6") {values.makeHappiness = 6}
                 else {values.makeHappiness = 0}
                 if (trial.makeHappiness.response == "0") {values.missHappiness = 1;}
                 else {values.missHappiness = 0};
                 values.race = list.race_block1.nextvalue]
/ posttrialpause = parameters.ISI
</trial>

<trial makeFAMS>
/ inputdevice = mouse
/ ontrialbegin = [values.trialCount += 1]
/ stimulusframes = [1 = clearscreen, FamQuestion, Fam1, Fam2, Fam3, Fam4, Fam5, Fam6, 1, 2, 3, 4, 5, 6, faces_block2]
/ trialduration = 3000
/ validresponse = (1, 2, 3, 4, 5, 6, Fam1, Fam2, Fam3, Fam4, Fam5, Fam6)
/ ontrialend = [values.face = picture.faces_block2.currentitem;
                 if (trial.makeFAMS.response == "Fam1" ||trial.makeFAMS.response == "1") {values.makeFAMS = 1;}
                 else if (trial.makeFAMS.response == "Fam2" ||trial.makeFAMS.response == "2") {values.makeFAMS = 2}
                 else if (trial.makeFAMS.response == "Fam3" ||trial.makeFAMS.response == "3") {values.makeFAMS = 3}
                 else if (trial.makeFAMS.response == "Fam4" ||trial.makeFAMS.response == "4") {values.makeFAMS = 4}
                 else if (trial.makeFAMS.response == "Fam5" ||trial.makeFAMS.response == "5") {values.makeFAMS = 5}
                 else if (trial.makeFAMS.response == "Fam6" ||trial.makeFAMS.response == "6") {values.makeFAMS = 6}
                 else {values.makeFAMS = 0}
                 if (trial.makeFAMS.response == "0") {values.missFams = 1;}
                 else {values.missFams = 0};
                 values.race = list.race_block2.nextvalue]
/ posttrialpause = parameters.ISI
</trial>

------------------------------------------------------------------------------------------
****** INSTRUCTIONS
------------------------------------------------------------------------------------------
<item Instructions>
/ 1 = "1 Welcome.png"
/ 2 = "2 BackgroundInfo.png"
/ 3 = "3 HapInstr1.png"
/ 4 = "4 HapInstr2.png"
/ 5 = "5 FamInstr1.png"
/ 6 = "6 FamInstr2.png"
</item>

<picture InstructionsDisplay>
/ items = Instructions
/ select = sequence
/ size = (100%, 100%)
/ position = (50%, 50%)
</picture>

<picture WelcomeScreen>
/ items = Instructions
/ select = sequence
/ size = (100%, 100%)
/ position = (50%, 50%)
</picture>


<trial Instructions>
/ stimulusframes = [1 = InstructionsDisplay, ContinueButton]
/ ontrialbegin = [values.instructnum += 1]
/ inputdevice = mouse
/ validresponse = (ContinueButton)
/ posttrialpause = parameters.ISI
</trial>

<text ContinueButton>
/ items = ("Continue >>")
/ position = (90%, 87%)
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (10%, 8%)
/ vjustify = center
</text>

------------------------------------------------------------------------------------------
****** HAPPINESS
------------------------------------------------------------------------------------------
<item HappinessQuestion>
/1 = "Rate how happy you think this face is"
</item>

<text HappinessQuestion>
/items = HappinessQuestion
/ position = (50, 70)
/ txcolor = (white)
/ txbgcolor = black
/ fontstyle = ("Arial", 3.0%, true, false, false, false, 5, 1)
</text>

<text Hap1>
/ items = ("Definitely Unhappy")
/ position = (15%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

<text Hap2>
/ items = ("Somewhat Unhappy")
/ position = (29%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

<text Hap3>
/ items = ("Maybe Unhappy")
/ position = (43%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (10%, 5%)
/ vjustify = center
</text>

<text Hap4>
/ items = ("Maybe Happy")
/ position = (57%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (10%, 5%)
/ vjustify = center
</text>

<text Hap5>
/ items = ("Somewhat Happy")
/ position = (71%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

<text Hap6>
/ items = ("Definitely Happy")
/ position = (85%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

------------------------------------------------------------------------------------------
****** FAMILIARITY
------------------------------------------------------------------------------------------
<item FamQuestion>
/1 = "Rate your familiarity with this topic"
</item>

<text FamQuestion>
/items = FamQuestion
/ position = (50, 70)
/ txcolor = (white)
/ txbgcolor = black
/ fontstyle = ("Arial", 3.0%, true, false, false, false, 5, 1)
</text>

<text Fam1>
/ items = ("Definitely Unfamiliar")
/ position = (15%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

<text Fam2>
/ items = ("Somewhat Unfamiliar")
/ position = (29%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

<text Fam3>
/ items = ("Maybe Unfamiliar")
/ position = (43%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (10%, 5%)
/ vjustify = center
</text>

<text Fam4>
/ items = ("Maybe Familiar")
/ position = (57%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (10%, 5%)
/ vjustify = center
</text>

<text Fam5>
/ items = ("Somewhat Familiar")
/ position = (71%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

<text Fam6>
/ items = ("Definitely Familiar")
/ position = (85%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

------------------------------------------------------------------------------------------
****** GENERAL CONTINUE 7 LIKERT
------------------------------------------------------------------------------------------
<text NextButton>
/ items = ("Next >>")
/ position = (50%, 50%)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (10%, 10%)
/ vjustify = center
</text>

<text 1>
/ items = ("1")
/ position = (15%, 80%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (5%, 5%)
/ vjustify = center
</text>

<text 2>
/ items = ("2")
/ position = (29%, 80%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (5%, 5%)
/ vjustify = center
</text>

<text 3>
/ items = ("3")
/ position = (43%, 80%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (5%, 5%)
/ vjustify = center
</text>

<text 4>
/ items = ("4")
/ position = (57%, 80%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (5%, 5%)
/ vjustify = center
</text>

<text 5>
/ items = ("5")
/ position = (71%, 80%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (5%, 5%)
/ vjustify = center
</text>

<text 6>
/ items = ("6")
/ position = (85%, 80%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (5%, 5%)
/ vjustify = center
</text>

------------------------------------------------------------------------------------------
****** LISTS - BLOCK 1
------------------------------------------------------------------------------------------

<picture faces_block1>
/ items = ("face1.jpg", "face2.jpg", "face3.jpg", "face4.jpg", "face5.jpg", "face6.jpg", "face7.jpg", "face8.jpg", "face9.jpg", "face10.jpg",
"face11.jpg", "face12.jpg", "face13.jpg", "face14.jpg", "face15.jpg", "face16.jpg")
/ size = (60%, 60%)
/ position = (50, 32)
/ select = noreplace
/ erase = false
</picture>

<list race_block1>
/ items = ("white", "white", "hispanic", "white", "African American", "Asian", "African American", "Asian", "white", "white",
"white", "hispanic", "Native Hawaiian", "African American", "Asian", "African American")
/ selectionmode = picture.faces_block1.currentindex
</list>

------------------------------------------------------------------------------------------
****** LISTS - BLOCK 2
------------------------------------------------------------------------------------------
<picture faces_block2>
/ items = ("face1.jpg", "face2.jpg", "face3.jpg", "face4.jpg", "face5.jpg", "face6.jpg", "face7.jpg", "face8.jpg", "face9.jpg", "face10.jpg",
"face11.jpg", "face12.jpg", "face13.jpg", "face14.jpg", "face15.jpg", "face16.jpg")
/ size = (60%, 60%)
/ position = (50, 32)
/ select = noreplace
/ erase = false
</picture>

<list race_block2>
/ items = ("white", "white", "hispanic", "white", "African American", "Asian", "African American", "Asian", "white", "white",
"white", "hispanic", "Native Hawaiian", "African American", "Asian", "African American")
/ selectionmode = picture.faces_block2.currentindex
</list>

------------------------------------------------------------------------------------------
****** INSTRUCTION COMPREHENSION CHECK PART 1
------------------------------------------------------------------------------------------

<surveypage HapInstrCompQ>
/ caption = "Please answer the following questions"
/ questions = [1 = HapCompCheck1, HapCompCheck2, HapCompCheck3]
/ responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ itemfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ itemspacing = 5%
/ showpagenumbers = false
/ navigationbuttonfontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1)
/ navigationbuttonsize = (10%, 8%)
/ nextbuttonposition = (85%, 85%)
/ showbackbutton=false
/ showquestionnumbers = false
/ branch = [if (radiobuttons.HapCompCheck1.response != "Level of Happiness" || radiobuttons.HapCompCheck2.response != "Faces"
             || radiobuttons.HapCompCheck3.response != "4 seconds") block.Happiness]
</surveypage>


<radiobuttons HapCompCheck1>
/ caption="What ratings will you be making?"
/ options=(
"Level of Happiness",
"Level of Abstractness",
"Level of Enjoyment")
/ required=true
</radiobuttons>

<radiobuttons HapCompCheck2>
/ caption="What will you be looking at?"
/ options=(
"Faces",
"Landscape",
"Aeroplanes")
/ required=true
</radiobuttons>

<radiobuttons HapCompCheck3>
/ caption="How many seconds will you have to make a judgement?"
/ options=(
"4 seconds",
"40 seconds",
"there is no time limit")
/ required=true
</radiobuttons>

------------------------------------------------------------------------------------------
****** INSTRUCTION COMPREHENSION CHECK PART 2
------------------------------------------------------------------------------------------

<surveypage FamInstrCompQ>
/ caption = "Please answer the following questions"
/ questions = [1 = FamCompCheck1, FamCompCheck2, FamCompCheck3]
/ responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ itemfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ itemspacing = 5%
/ showpagenumbers = false
/ navigationbuttonfontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1)
/ navigationbuttonsize = (10%, 8%)
/ nextbuttonposition = (85%, 85%)
/ showbackbutton=false
/ showquestionnumbers = false
/ branch = [if (radiobuttons.FamCompCheck1.response != "Level of Familiarity" || radiobuttons.FamCompCheck2.response != "Faces"
             || radiobuttons.FamCompCheck3.response != "5 seconds") block.Familiarity]
</surveypage>

<radiobuttons FamCompCheck1>
/ caption="What ratings will you be making?"
/ options=(
"Level of Familiarity",
"Level of Happiness",
"Level of Enjoyment")
/ required=true
</radiobuttons>

<radiobuttons FamCompCheck2>
/ caption="What will you be looking at?"
/ options=(
"Animals",
"Houses",
"Faces")
/ required=true
</radiobuttons>

<radiobuttons FamCompCheck3>
/ caption="How many seconds will you have to make a judgement?"
/ options=(
"3 seconds",
"20 seconds",
"there is no time limit")
/ required=true
</radiobuttons>


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
KempInquisit - 12/3/2020
Hello, I want to reshow my instruction pages if participants fail the instructional check questions. However, I am happy problems looping back to the beginning of the trial to show the instructions. My "branch" back to the beginning of the does not work at all the program just continues to the following trials. It's highly likely that I have just coded the "branch" wrong. I have included my code below and 
Specifically: the code in INSTRUCTION COMPREHENSION CHECK PART 1: <surveypage HapInstrCompQ> 
INSTRUCTION COMPREHENSION CHECK PART 2: <surveypage FamInstrCompQ>
Thank you for your help.
-----------------------------------------------------------------------------------------
TITLE
Experiment 1 - Face Recognition
------------------------------------------------------------------------------------------

DEFAULTS

<defaults>
/ fontstyle = ("Arial", 20pt)
/ screencolor = white
/ txcolor = black
/ halign = center
/ canvassize = (100%, 100%)
/ windowsize = (100%, 100%)
</defaults>

<values>
/ instructnum = 1
/ trialCount = 0
/ CB = "NA"
/ group = "NA"
/ race = "NA"
/ face = "NA"
/ makeHappiness = 0
/ missHappiness = 0
/ makeFams = 0
/ missFams = 0
</values>

<parameters>
/ nBlocks = 4
/ nTrials = 60
/ nTest = nTrials
/ ISI = 500
</parameters>

<expressions>
/ instructnum = if (contains(script.currenttrial, "Instructions")){values.instructnum} else {"NA"}
/ trialCount = if(script.currentblock == "Happiness") {values.trialCount} else {"NA"}

/ race = if(script.currenttrial == "makeHappiness") {values.race} else{ "NA"}
/ face = if(script.currenttrial == "makeHappiness"){values.face} else{"NA"}

/ makeHappiness = if(script.currenttrial == "makeHappiness"){values.makeHappiness} else {"NA"}
/ missHappiness = if(script.currenttrial == "makeHappiness"){values.makeHappiness} else {"NA"}


/ makeFams = if(script.currenttrial == "makeFams"){values.makeFams} else {"NA"}
/ missFams = if(script.currenttrial == "makeFams"){values.missFams} else {"NA"}
</expressions>

------------------------------------------------------------------------------------------
<expt CB1>
/ onexptbegin = [if (computer.platform != "mac" && computer.platform != "win") script.abort()]
/ onexptbegin = [values.CB = 1]
/ groupassignment = groupnumber
/ blocks = [1=Welcome; 2=Happiness; 3 = Familiarity]
</expt>

------------------------------------------------------------------------------------------
****** DATA
------------------------------------------------------------------------------------------
<data>
/ file = "Face Recognition.iqdat"
/ separatefiles = true
/ labels = true
/ columns = [subject, group, date, time, blockcode, trialcode, response, latency,
            expressions.race, expressions.makeHappiness, expressions.missHappiness, expressions.face, expressions.makeFams, expressions.missFams]
</data>

------------------------------------------------------------------------------------------
****** BLOCKS
------------------------------------------------------------------------------------------

<block Welcome>
/ trials = [1 = Instructions]
</block>

<block Happiness>
/ onblockbegin = [values.instructnum = 2; values.trialCount = 0; values.makeHappiness = 1]
/ trials = [1-3 = Instructions; 4 = HapInstrCompQ; 5-15 = sequence (makeHappiness, NextTrial)]
/ onblockend = [values.missHappiness = 0]
</block>

<block Familiarity>
/ onblockbegin = [values.instructnum = 5; values.trialCount = 0; values.makeFams = 1]
/ trials = [1-3 = Instructions; 4 = FamInstrCompQ; 5-63 = sequence (makeFams, NextTrial)]
/ onblockend = [values.missFams = 0]
</block>

------------------------------------------------------------------------------------------
****** TRIALS        
------------------------------------------------------------------------------------------

<trial NextTrial>
/ inputdevice = mouse
/ stimulusframes = [1 = clearscreen, NextButton]
/ validresponse = (NextButton)
/ posttrialpause = parameters.ISI
</trial>

<trial makeHappiness>
/ inputdevice = mouse
/ ontrialbegin = [values.trialCount += 1]
/ stimulusframes = [1 = clearscreen, HappinessQuestion, Hap1, Hap2, Hap3, Hap4, Hap5, Hap6, 1, 2, 3, 4, 5, 6, faces_block1]
/ trialduration = 5000
/ validresponse = (1, 2, 3, 4, 5, 6, Hap1, Hap2, Hap3, Hap4, Hap5, Hap6)
/ ontrialend = [values.face = picture.faces_block1.currentitem;
                 if (trial.makeHappiness.response == "Hap1" ||trial.makeHappiness.response == "1") {values.makeHappiness = 1;}
                 else if (trial.makeHappiness.response == "Hap2" ||trial.makeHappiness.response == "2") {values.makeHappiness = 2}
                 else if (trial.makeHappiness.response == "Hap3" ||trial.makeHappiness.response == "3") {values.makeHappiness = 3}
                 else if (trial.makeHappiness.response == "Hap4" ||trial.makeHappiness.response == "4") {values.makeHappiness = 4}
                 else if (trial.makeHappiness.response == "Hap5" ||trial.makeHappiness.response == "5") {values.makeHappiness = 5}
                 else if (trial.makeHappiness.response == "Hap6" ||trial.makeHappiness.response == "6") {values.makeHappiness = 6}
                 else {values.makeHappiness = 0}
                 if (trial.makeHappiness.response == "0") {values.missHappiness = 1;}
                 else {values.missHappiness = 0};
                 values.race = list.race_block1.nextvalue]
/ posttrialpause = parameters.ISI
</trial>

<trial makeFAMS>
/ inputdevice = mouse
/ ontrialbegin = [values.trialCount += 1]
/ stimulusframes = [1 = clearscreen, FamQuestion, Fam1, Fam2, Fam3, Fam4, Fam5, Fam6, 1, 2, 3, 4, 5, 6, faces_block2]
/ trialduration = 3000
/ validresponse = (1, 2, 3, 4, 5, 6, Fam1, Fam2, Fam3, Fam4, Fam5, Fam6)
/ ontrialend = [values.face = picture.faces_block2.currentitem;
                 if (trial.makeFAMS.response == "Fam1" ||trial.makeFAMS.response == "1") {values.makeFAMS = 1;}
                 else if (trial.makeFAMS.response == "Fam2" ||trial.makeFAMS.response == "2") {values.makeFAMS = 2}
                 else if (trial.makeFAMS.response == "Fam3" ||trial.makeFAMS.response == "3") {values.makeFAMS = 3}
                 else if (trial.makeFAMS.response == "Fam4" ||trial.makeFAMS.response == "4") {values.makeFAMS = 4}
                 else if (trial.makeFAMS.response == "Fam5" ||trial.makeFAMS.response == "5") {values.makeFAMS = 5}
                 else if (trial.makeFAMS.response == "Fam6" ||trial.makeFAMS.response == "6") {values.makeFAMS = 6}
                 else {values.makeFAMS = 0}
                 if (trial.makeFAMS.response == "0") {values.missFams = 1;}
                 else {values.missFams = 0};
                 values.race = list.race_block2.nextvalue]
/ posttrialpause = parameters.ISI
</trial>

------------------------------------------------------------------------------------------
****** INSTRUCTIONS
------------------------------------------------------------------------------------------
<item Instructions>
/ 1 = "1 Welcome.png"
/ 2 = "2 BackgroundInfo.png"
/ 3 = "3 HapInstr1.png"
/ 4 = "4 HapInstr2.png"
/ 5 = "5 FamInstr1.png"
/ 6 = "6 FamInstr2.png"
</item>

<picture InstructionsDisplay>
/ items = Instructions
/ select = sequence
/ size = (100%, 100%)
/ position = (50%, 50%)
</picture>

<picture WelcomeScreen>
/ items = Instructions
/ select = sequence
/ size = (100%, 100%)
/ position = (50%, 50%)
</picture>


<trial Instructions>
/ stimulusframes = [1 = InstructionsDisplay, ContinueButton]
/ ontrialbegin = [values.instructnum += 1]
/ inputdevice = mouse
/ validresponse = (ContinueButton)
/ posttrialpause = parameters.ISI
</trial>

<text ContinueButton>
/ items = ("Continue >>")
/ position = (90%, 87%)
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (10%, 8%)
/ vjustify = center
</text>

------------------------------------------------------------------------------------------
****** HAPPINESS
------------------------------------------------------------------------------------------
<item HappinessQuestion>
/1 = "Rate how happy you think this face is"
</item>

<text HappinessQuestion>
/items = HappinessQuestion
/ position = (50, 70)
/ txcolor = (white)
/ txbgcolor = black
/ fontstyle = ("Arial", 3.0%, true, false, false, false, 5, 1)
</text>

<text Hap1>
/ items = ("Definitely Unhappy")
/ position = (15%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

<text Hap2>
/ items = ("Somewhat Unhappy")
/ position = (29%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

<text Hap3>
/ items = ("Maybe Unhappy")
/ position = (43%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (10%, 5%)
/ vjustify = center
</text>

<text Hap4>
/ items = ("Maybe Happy")
/ position = (57%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (10%, 5%)
/ vjustify = center
</text>

<text Hap5>
/ items = ("Somewhat Happy")
/ position = (71%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

<text Hap6>
/ items = ("Definitely Happy")
/ position = (85%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

------------------------------------------------------------------------------------------
****** FAMILIARITY
------------------------------------------------------------------------------------------
<item FamQuestion>
/1 = "Rate your familiarity with this topic"
</item>

<text FamQuestion>
/items = FamQuestion
/ position = (50, 70)
/ txcolor = (white)
/ txbgcolor = black
/ fontstyle = ("Arial", 3.0%, true, false, false, false, 5, 1)
</text>

<text Fam1>
/ items = ("Definitely Unfamiliar")
/ position = (15%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

<text Fam2>
/ items = ("Somewhat Unfamiliar")
/ position = (29%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

<text Fam3>
/ items = ("Maybe Unfamiliar")
/ position = (43%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (10%, 5%)
/ vjustify = center
</text>

<text Fam4>
/ items = ("Maybe Familiar")
/ position = (57%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (10%, 5%)
/ vjustify = center
</text>

<text Fam5>
/ items = ("Somewhat Familiar")
/ position = (71%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

<text Fam6>
/ items = ("Definitely Familiar")
/ position = (85%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

------------------------------------------------------------------------------------------
****** GENERAL CONTINUE 7 LIKERT
------------------------------------------------------------------------------------------
<text NextButton>
/ items = ("Next >>")
/ position = (50%, 50%)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (10%, 10%)
/ vjustify = center
</text>

<text 1>
/ items = ("1")
/ position = (15%, 80%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (5%, 5%)
/ vjustify = center
</text>

<text 2>
/ items = ("2")
/ position = (29%, 80%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (5%, 5%)
/ vjustify = center
</text>

<text 3>
/ items = ("3")
/ position = (43%, 80%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (5%, 5%)
/ vjustify = center
</text>

<text 4>
/ items = ("4")
/ position = (57%, 80%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (5%, 5%)
/ vjustify = center
</text>

<text 5>
/ items = ("5")
/ position = (71%, 80%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (5%, 5%)
/ vjustify = center
</text>

<text 6>
/ items = ("6")
/ position = (85%, 80%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (5%, 5%)
/ vjustify = center
</text>

------------------------------------------------------------------------------------------
****** LISTS - BLOCK 1
------------------------------------------------------------------------------------------

<picture faces_block1>
/ items = ("face1.jpg", "face2.jpg", "face3.jpg", "face4.jpg", "face5.jpg", "face6.jpg", "face7.jpg", "face8.jpg", "face9.jpg", "face10.jpg",
"face11.jpg", "face12.jpg", "face13.jpg", "face14.jpg", "face15.jpg", "face16.jpg")
/ size = (60%, 60%)
/ position = (50, 32)
/ select = noreplace
/ erase = false
</picture>

<list race_block1>
/ items = ("white", "white", "hispanic", "white", "African American", "Asian", "African American", "Asian", "white", "white",
"white", "hispanic", "Native Hawaiian", "African American", "Asian", "African American")
/ selectionmode = picture.faces_block1.currentindex
</list>

------------------------------------------------------------------------------------------
****** LISTS - BLOCK 2
------------------------------------------------------------------------------------------
<picture faces_block2>
/ items = ("face1.jpg", "face2.jpg", "face3.jpg", "face4.jpg", "face5.jpg", "face6.jpg", "face7.jpg", "face8.jpg", "face9.jpg", "face10.jpg",
"face11.jpg", "face12.jpg", "face13.jpg", "face14.jpg", "face15.jpg", "face16.jpg")
/ size = (60%, 60%)
/ position = (50, 32)
/ select = noreplace
/ erase = false
</picture>

<list race_block2>
/ items = ("white", "white", "hispanic", "white", "African American", "Asian", "African American", "Asian", "white", "white",
"white", "hispanic", "Native Hawaiian", "African American", "Asian", "African American")
/ selectionmode = picture.faces_block2.currentindex
</list>

------------------------------------------------------------------------------------------
****** INSTRUCTION COMPREHENSION CHECK PART 1
------------------------------------------------------------------------------------------

<surveypage HapInstrCompQ>
/ caption = "Please answer the following questions"
/ questions = [1 = HapCompCheck1, HapCompCheck2, HapCompCheck3]
/ responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ itemfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ itemspacing = 5%
/ showpagenumbers = false
/ navigationbuttonfontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1)
/ navigationbuttonsize = (10%, 8%)
/ nextbuttonposition = (85%, 85%)
/ showbackbutton=false
/ showquestionnumbers = false
/ branch = [if (radiobuttons.HapCompCheck1.response != "Level of Happiness" || radiobuttons.HapCompCheck2.response != "Faces"
             || radiobuttons.HapCompCheck3.response != "4 seconds") block.Happiness]
</surveypage>


<radiobuttons HapCompCheck1>
/ caption="What ratings will you be making?"
/ options=(
"Level of Happiness",
"Level of Abstractness",
"Level of Enjoyment")
/ required=true
</radiobuttons>

<radiobuttons HapCompCheck2>
/ caption="What will you be looking at?"
/ options=(
"Faces",
"Landscape",
"Aeroplanes")
/ required=true
</radiobuttons>

<radiobuttons HapCompCheck3>
/ caption="How many seconds will you have to make a judgement?"
/ options=(
"4 seconds",
"40 seconds",
"there is no time limit")
/ required=true
</radiobuttons>

------------------------------------------------------------------------------------------
****** INSTRUCTION COMPREHENSION CHECK PART 2
------------------------------------------------------------------------------------------

<surveypage FamInstrCompQ>
/ caption = "Please answer the following questions"
/ questions = [1 = FamCompCheck1, FamCompCheck2, FamCompCheck3]
/ responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ itemfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ itemspacing = 5%
/ showpagenumbers = false
/ navigationbuttonfontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1)
/ navigationbuttonsize = (10%, 8%)
/ nextbuttonposition = (85%, 85%)
/ showbackbutton=false
/ showquestionnumbers = false
/ branch = [if (radiobuttons.FamCompCheck1.response != "Level of Familiarity" || radiobuttons.FamCompCheck2.response != "Faces"
             || radiobuttons.FamCompCheck3.response != "5 seconds") block.Familiarity]
</surveypage>

<radiobuttons FamCompCheck1>
/ caption="What ratings will you be making?"
/ options=(
"Level of Familiarity",
"Level of Happiness",
"Level of Enjoyment")
/ required=true
</radiobuttons>

<radiobuttons FamCompCheck2>
/ caption="What will you be looking at?"
/ options=(
"Animals",
"Houses",
"Faces")
/ required=true
</radiobuttons>

<radiobuttons FamCompCheck3>
/ caption="How many seconds will you have to make a judgement?"
/ options=(
"3 seconds",
"20 seconds",
"there is no time limit")
/ required=true
</radiobuttons>


A <surveypage> is a kind of <trial>. A <trial> cannot /branch to a <block>. Branches have to be at the same level, i.e. if you need to branch to a block, the branch belongs at the <block> level. Put the instructions trials in their own block, and then you can repeat that block as needed per a /branch in that block.

Edited 4 Years Ago by Dave
Paige Kemp
Paige Kemp
Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)
Group: Forum Members
Posts: 20, Visits: 84
Dave - 12/3/2020
KempInquisit - 12/3/2020
Hello, I want to reshow my instruction pages if participants fail the instructional check questions. However, I am happy problems looping back to the beginning of the trial to show the instructions. My "branch" back to the beginning of the does not work at all the program just continues to the following trials. It's highly likely that I have just coded the "branch" wrong. I have included my code below and 
Specifically: the code in INSTRUCTION COMPREHENSION CHECK PART 1: <surveypage HapInstrCompQ> 
INSTRUCTION COMPREHENSION CHECK PART 2: <surveypage FamInstrCompQ>
Thank you for your help.
-----------------------------------------------------------------------------------------
TITLE
Experiment 1 - Face Recognition
------------------------------------------------------------------------------------------

DEFAULTS

<defaults>
/ fontstyle = ("Arial", 20pt)
/ screencolor = white
/ txcolor = black
/ halign = center
/ canvassize = (100%, 100%)
/ windowsize = (100%, 100%)
</defaults>

<values>
/ instructnum = 1
/ trialCount = 0
/ CB = "NA"
/ group = "NA"
/ race = "NA"
/ face = "NA"
/ makeHappiness = 0
/ missHappiness = 0
/ makeFams = 0
/ missFams = 0
</values>

<parameters>
/ nBlocks = 4
/ nTrials = 60
/ nTest = nTrials
/ ISI = 500
</parameters>

<expressions>
/ instructnum = if (contains(script.currenttrial, "Instructions")){values.instructnum} else {"NA"}
/ trialCount = if(script.currentblock == "Happiness") {values.trialCount} else {"NA"}

/ race = if(script.currenttrial == "makeHappiness") {values.race} else{ "NA"}
/ face = if(script.currenttrial == "makeHappiness"){values.face} else{"NA"}

/ makeHappiness = if(script.currenttrial == "makeHappiness"){values.makeHappiness} else {"NA"}
/ missHappiness = if(script.currenttrial == "makeHappiness"){values.makeHappiness} else {"NA"}


/ makeFams = if(script.currenttrial == "makeFams"){values.makeFams} else {"NA"}
/ missFams = if(script.currenttrial == "makeFams"){values.missFams} else {"NA"}
</expressions>

------------------------------------------------------------------------------------------
<expt CB1>
/ onexptbegin = [if (computer.platform != "mac" && computer.platform != "win") script.abort()]
/ onexptbegin = [values.CB = 1]
/ groupassignment = groupnumber
/ blocks = [1=Welcome; 2=Happiness; 3 = Familiarity]
</expt>

------------------------------------------------------------------------------------------
****** DATA
------------------------------------------------------------------------------------------
<data>
/ file = "Face Recognition.iqdat"
/ separatefiles = true
/ labels = true
/ columns = [subject, group, date, time, blockcode, trialcode, response, latency,
            expressions.race, expressions.makeHappiness, expressions.missHappiness, expressions.face, expressions.makeFams, expressions.missFams]
</data>

------------------------------------------------------------------------------------------
****** BLOCKS
------------------------------------------------------------------------------------------

<block Welcome>
/ trials = [1 = Instructions]
</block>

<block Happiness>
/ onblockbegin = [values.instructnum = 2; values.trialCount = 0; values.makeHappiness = 1]
/ trials = [1-3 = Instructions; 4 = HapInstrCompQ; 5-15 = sequence (makeHappiness, NextTrial)]
/ onblockend = [values.missHappiness = 0]
</block>

<block Familiarity>
/ onblockbegin = [values.instructnum = 5; values.trialCount = 0; values.makeFams = 1]
/ trials = [1-3 = Instructions; 4 = FamInstrCompQ; 5-63 = sequence (makeFams, NextTrial)]
/ onblockend = [values.missFams = 0]
</block>

------------------------------------------------------------------------------------------
****** TRIALS        
------------------------------------------------------------------------------------------

<trial NextTrial>
/ inputdevice = mouse
/ stimulusframes = [1 = clearscreen, NextButton]
/ validresponse = (NextButton)
/ posttrialpause = parameters.ISI
</trial>

<trial makeHappiness>
/ inputdevice = mouse
/ ontrialbegin = [values.trialCount += 1]
/ stimulusframes = [1 = clearscreen, HappinessQuestion, Hap1, Hap2, Hap3, Hap4, Hap5, Hap6, 1, 2, 3, 4, 5, 6, faces_block1]
/ trialduration = 5000
/ validresponse = (1, 2, 3, 4, 5, 6, Hap1, Hap2, Hap3, Hap4, Hap5, Hap6)
/ ontrialend = [values.face = picture.faces_block1.currentitem;
                 if (trial.makeHappiness.response == "Hap1" ||trial.makeHappiness.response == "1") {values.makeHappiness = 1;}
                 else if (trial.makeHappiness.response == "Hap2" ||trial.makeHappiness.response == "2") {values.makeHappiness = 2}
                 else if (trial.makeHappiness.response == "Hap3" ||trial.makeHappiness.response == "3") {values.makeHappiness = 3}
                 else if (trial.makeHappiness.response == "Hap4" ||trial.makeHappiness.response == "4") {values.makeHappiness = 4}
                 else if (trial.makeHappiness.response == "Hap5" ||trial.makeHappiness.response == "5") {values.makeHappiness = 5}
                 else if (trial.makeHappiness.response == "Hap6" ||trial.makeHappiness.response == "6") {values.makeHappiness = 6}
                 else {values.makeHappiness = 0}
                 if (trial.makeHappiness.response == "0") {values.missHappiness = 1;}
                 else {values.missHappiness = 0};
                 values.race = list.race_block1.nextvalue]
/ posttrialpause = parameters.ISI
</trial>

<trial makeFAMS>
/ inputdevice = mouse
/ ontrialbegin = [values.trialCount += 1]
/ stimulusframes = [1 = clearscreen, FamQuestion, Fam1, Fam2, Fam3, Fam4, Fam5, Fam6, 1, 2, 3, 4, 5, 6, faces_block2]
/ trialduration = 3000
/ validresponse = (1, 2, 3, 4, 5, 6, Fam1, Fam2, Fam3, Fam4, Fam5, Fam6)
/ ontrialend = [values.face = picture.faces_block2.currentitem;
                 if (trial.makeFAMS.response == "Fam1" ||trial.makeFAMS.response == "1") {values.makeFAMS = 1;}
                 else if (trial.makeFAMS.response == "Fam2" ||trial.makeFAMS.response == "2") {values.makeFAMS = 2}
                 else if (trial.makeFAMS.response == "Fam3" ||trial.makeFAMS.response == "3") {values.makeFAMS = 3}
                 else if (trial.makeFAMS.response == "Fam4" ||trial.makeFAMS.response == "4") {values.makeFAMS = 4}
                 else if (trial.makeFAMS.response == "Fam5" ||trial.makeFAMS.response == "5") {values.makeFAMS = 5}
                 else if (trial.makeFAMS.response == "Fam6" ||trial.makeFAMS.response == "6") {values.makeFAMS = 6}
                 else {values.makeFAMS = 0}
                 if (trial.makeFAMS.response == "0") {values.missFams = 1;}
                 else {values.missFams = 0};
                 values.race = list.race_block2.nextvalue]
/ posttrialpause = parameters.ISI
</trial>

------------------------------------------------------------------------------------------
****** INSTRUCTIONS
------------------------------------------------------------------------------------------
<item Instructions>
/ 1 = "1 Welcome.png"
/ 2 = "2 BackgroundInfo.png"
/ 3 = "3 HapInstr1.png"
/ 4 = "4 HapInstr2.png"
/ 5 = "5 FamInstr1.png"
/ 6 = "6 FamInstr2.png"
</item>

<picture InstructionsDisplay>
/ items = Instructions
/ select = sequence
/ size = (100%, 100%)
/ position = (50%, 50%)
</picture>

<picture WelcomeScreen>
/ items = Instructions
/ select = sequence
/ size = (100%, 100%)
/ position = (50%, 50%)
</picture>


<trial Instructions>
/ stimulusframes = [1 = InstructionsDisplay, ContinueButton]
/ ontrialbegin = [values.instructnum += 1]
/ inputdevice = mouse
/ validresponse = (ContinueButton)
/ posttrialpause = parameters.ISI
</trial>

<text ContinueButton>
/ items = ("Continue >>")
/ position = (90%, 87%)
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (10%, 8%)
/ vjustify = center
</text>

------------------------------------------------------------------------------------------
****** HAPPINESS
------------------------------------------------------------------------------------------
<item HappinessQuestion>
/1 = "Rate how happy you think this face is"
</item>

<text HappinessQuestion>
/items = HappinessQuestion
/ position = (50, 70)
/ txcolor = (white)
/ txbgcolor = black
/ fontstyle = ("Arial", 3.0%, true, false, false, false, 5, 1)
</text>

<text Hap1>
/ items = ("Definitely Unhappy")
/ position = (15%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

<text Hap2>
/ items = ("Somewhat Unhappy")
/ position = (29%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

<text Hap3>
/ items = ("Maybe Unhappy")
/ position = (43%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (10%, 5%)
/ vjustify = center
</text>

<text Hap4>
/ items = ("Maybe Happy")
/ position = (57%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (10%, 5%)
/ vjustify = center
</text>

<text Hap5>
/ items = ("Somewhat Happy")
/ position = (71%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

<text Hap6>
/ items = ("Definitely Happy")
/ position = (85%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

------------------------------------------------------------------------------------------
****** FAMILIARITY
------------------------------------------------------------------------------------------
<item FamQuestion>
/1 = "Rate your familiarity with this topic"
</item>

<text FamQuestion>
/items = FamQuestion
/ position = (50, 70)
/ txcolor = (white)
/ txbgcolor = black
/ fontstyle = ("Arial", 3.0%, true, false, false, false, 5, 1)
</text>

<text Fam1>
/ items = ("Definitely Unfamiliar")
/ position = (15%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

<text Fam2>
/ items = ("Somewhat Unfamiliar")
/ position = (29%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

<text Fam3>
/ items = ("Maybe Unfamiliar")
/ position = (43%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (10%, 5%)
/ vjustify = center
</text>

<text Fam4>
/ items = ("Maybe Familiar")
/ position = (57%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (10%, 5%)
/ vjustify = center
</text>

<text Fam5>
/ items = ("Somewhat Familiar")
/ position = (71%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

<text Fam6>
/ items = ("Definitely Familiar")
/ position = (85%, 85%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ txbgcolor = (black)
/ size = (12%, 5%)
/ vjustify = center
</text>

------------------------------------------------------------------------------------------
****** GENERAL CONTINUE 7 LIKERT
------------------------------------------------------------------------------------------
<text NextButton>
/ items = ("Next >>")
/ position = (50%, 50%)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (10%, 10%)
/ vjustify = center
</text>

<text 1>
/ items = ("1")
/ position = (15%, 80%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (5%, 5%)
/ vjustify = center
</text>

<text 2>
/ items = ("2")
/ position = (29%, 80%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (5%, 5%)
/ vjustify = center
</text>

<text 3>
/ items = ("3")
/ position = (43%, 80%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (5%, 5%)
/ vjustify = center
</text>

<text 4>
/ items = ("4")
/ position = (57%, 80%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (5%, 5%)
/ vjustify = center
</text>

<text 5>
/ items = ("5")
/ position = (71%, 80%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (5%, 5%)
/ vjustify = center
</text>

<text 6>
/ items = ("6")
/ position = (85%, 80%)
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ txbgcolor = (white)
/ size = (5%, 5%)
/ vjustify = center
</text>

------------------------------------------------------------------------------------------
****** LISTS - BLOCK 1
------------------------------------------------------------------------------------------

<picture faces_block1>
/ items = ("face1.jpg", "face2.jpg", "face3.jpg", "face4.jpg", "face5.jpg", "face6.jpg", "face7.jpg", "face8.jpg", "face9.jpg", "face10.jpg",
"face11.jpg", "face12.jpg", "face13.jpg", "face14.jpg", "face15.jpg", "face16.jpg")
/ size = (60%, 60%)
/ position = (50, 32)
/ select = noreplace
/ erase = false
</picture>

<list race_block1>
/ items = ("white", "white", "hispanic", "white", "African American", "Asian", "African American", "Asian", "white", "white",
"white", "hispanic", "Native Hawaiian", "African American", "Asian", "African American")
/ selectionmode = picture.faces_block1.currentindex
</list>

------------------------------------------------------------------------------------------
****** LISTS - BLOCK 2
------------------------------------------------------------------------------------------
<picture faces_block2>
/ items = ("face1.jpg", "face2.jpg", "face3.jpg", "face4.jpg", "face5.jpg", "face6.jpg", "face7.jpg", "face8.jpg", "face9.jpg", "face10.jpg",
"face11.jpg", "face12.jpg", "face13.jpg", "face14.jpg", "face15.jpg", "face16.jpg")
/ size = (60%, 60%)
/ position = (50, 32)
/ select = noreplace
/ erase = false
</picture>

<list race_block2>
/ items = ("white", "white", "hispanic", "white", "African American", "Asian", "African American", "Asian", "white", "white",
"white", "hispanic", "Native Hawaiian", "African American", "Asian", "African American")
/ selectionmode = picture.faces_block2.currentindex
</list>

------------------------------------------------------------------------------------------
****** INSTRUCTION COMPREHENSION CHECK PART 1
------------------------------------------------------------------------------------------

<surveypage HapInstrCompQ>
/ caption = "Please answer the following questions"
/ questions = [1 = HapCompCheck1, HapCompCheck2, HapCompCheck3]
/ responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ itemfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ itemspacing = 5%
/ showpagenumbers = false
/ navigationbuttonfontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1)
/ navigationbuttonsize = (10%, 8%)
/ nextbuttonposition = (85%, 85%)
/ showbackbutton=false
/ showquestionnumbers = false
/ branch = [if (radiobuttons.HapCompCheck1.response != "Level of Happiness" || radiobuttons.HapCompCheck2.response != "Faces"
             || radiobuttons.HapCompCheck3.response != "4 seconds") block.Happiness]
</surveypage>


<radiobuttons HapCompCheck1>
/ caption="What ratings will you be making?"
/ options=(
"Level of Happiness",
"Level of Abstractness",
"Level of Enjoyment")
/ required=true
</radiobuttons>

<radiobuttons HapCompCheck2>
/ caption="What will you be looking at?"
/ options=(
"Faces",
"Landscape",
"Aeroplanes")
/ required=true
</radiobuttons>

<radiobuttons HapCompCheck3>
/ caption="How many seconds will you have to make a judgement?"
/ options=(
"4 seconds",
"40 seconds",
"there is no time limit")
/ required=true
</radiobuttons>

------------------------------------------------------------------------------------------
****** INSTRUCTION COMPREHENSION CHECK PART 2
------------------------------------------------------------------------------------------

<surveypage FamInstrCompQ>
/ caption = "Please answer the following questions"
/ questions = [1 = FamCompCheck1, FamCompCheck2, FamCompCheck3]
/ responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ itemfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ itemspacing = 5%
/ showpagenumbers = false
/ navigationbuttonfontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1)
/ navigationbuttonsize = (10%, 8%)
/ nextbuttonposition = (85%, 85%)
/ showbackbutton=false
/ showquestionnumbers = false
/ branch = [if (radiobuttons.FamCompCheck1.response != "Level of Familiarity" || radiobuttons.FamCompCheck2.response != "Faces"
             || radiobuttons.FamCompCheck3.response != "5 seconds") block.Familiarity]
</surveypage>

<radiobuttons FamCompCheck1>
/ caption="What ratings will you be making?"
/ options=(
"Level of Familiarity",
"Level of Happiness",
"Level of Enjoyment")
/ required=true
</radiobuttons>

<radiobuttons FamCompCheck2>
/ caption="What will you be looking at?"
/ options=(
"Animals",
"Houses",
"Faces")
/ required=true
</radiobuttons>

<radiobuttons FamCompCheck3>
/ caption="How many seconds will you have to make a judgement?"
/ options=(
"3 seconds",
"20 seconds",
"there is no time limit")
/ required=true
</radiobuttons>


A <surveypage> is a kind of <trial>. A <trial> cannot /branch to a <block>. Branches have to be at the same level, i.e. if you need to branch to a block, the branch belongs at the <block> level

Thanks Dave, what would you suggest for the instruction questionnaire since my preferable choice was using radio buttons? 
Best, 
Kemp
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
KempInquisit - 12/3/2020

Thanks Dave, what would you suggest for the instruction questionnaire since my preferable choice was using radio buttons? 
Best, 
Kemp

I'm confused. This has nothing to do with the branching. You can use whatever question format(s) you feel most comfortable with.

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
Dave - 12/3/2020
KempInquisit - 12/3/2020

Thanks Dave, what would you suggest for the instruction questionnaire since my preferable choice was using radio buttons? 
Best, 
Kemp

I'm confused. This has nothing to do with the branching. You can use whatever question format(s) you feel most comfortable with.

What I suggest you do re. the instruction check is this:

<block HappinessInstructions>
/ onblockbegin = [values.instructnum = 2; values.trialCount = 0; values.makeHappiness = 1]
/ trials = [1-3 = Instructions; 4 = HapInstrCompQ]
/ branch = [if (radiobuttons.HapCompCheck1.response != "Level of Happiness" || radiobuttons.HapCompCheck2.response != "Faces"
     || radiobuttons.HapCompCheck3.response != "4 seconds") block.HappinessInstructions]
</block>

<block Happiness>
/ onblockbegin = [values.instructnum = 2; values.trialCount = 0; values.makeHappiness = 1]
/ trials = [1-11 = sequence (makeHappiness, NextTrial)]
/ onblockend = [values.missHappiness = 0]
</block>

<block FamiliarityInstructions>
/ onblockbegin = [values.instructnum = 5; values.trialCount = 0; values.makeFams = 1]
/ trials = [1-3 = Instructions; 4 = FamInstrCompQ]
/ branch = [if (radiobuttons.FamCompCheck1.response != "Level of Familiarity" || radiobuttons.FamCompCheck2.response != "Faces"
     || radiobuttons.FamCompCheck3.response != "5 seconds") block.FamiliarityInstructions]
</block>

<block Familiarity>
/ onblockbegin = [values.instructnum = 5; values.trialCount = 0; values.makeFams = 1]
/ trials = [1-59 = sequence (makeFams, NextTrial)]
/ onblockend = [values.missFams = 0]
</block>

with

<expt CB1>
/ onexptbegin = [if (computer.platform != "mac" && computer.platform != "win") script.abort()]
/ onexptbegin = [values.CB = 1]
/ groupassignment = groupnumber
/ blocks = [1=Welcome; 2=HappinessInstructions; 3=Happiness; 4 = FamiliarityInstrucionts; 5 = Familiarity]
</expt>
Paige Kemp
Paige Kemp
Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)
Group: Forum Members
Posts: 20, Visits: 84
Dave - 12/3/2020
Dave - 12/3/2020
KempInquisit - 12/3/2020

Thanks Dave, what would you suggest for the instruction questionnaire since my preferable choice was using radio buttons? 
Best, 
Kemp

I'm confused. This has nothing to do with the branching. You can use whatever question format(s) you feel most comfortable with.

What I suggest you do re. the instruction check is this:

<block HappinessInstructions>
/ onblockbegin = [values.instructnum = 2; values.trialCount = 0; values.makeHappiness = 1]
/ trials = [1-3 = Instructions; 4 = HapInstrCompQ]
/ branch = [if (radiobuttons.HapCompCheck1.response != "Level of Happiness" || radiobuttons.HapCompCheck2.response != "Faces"
     || radiobuttons.HapCompCheck3.response != "4 seconds") block.HappinessInstructions]
</block>

<block Happiness>
/ onblockbegin = [values.instructnum = 2; values.trialCount = 0; values.makeHappiness = 1]
/ trials = [1-11 = sequence (makeHappiness, NextTrial)]
/ onblockend = [values.missHappiness = 0]
</block>

<block FamiliarityInstructions>
/ onblockbegin = [values.instructnum = 5; values.trialCount = 0; values.makeFams = 1]
/ trials = [1-3 = Instructions; 4 = FamInstrCompQ]
/ branch = [if (radiobuttons.FamCompCheck1.response != "Level of Familiarity" || radiobuttons.FamCompCheck2.response != "Faces"
     || radiobuttons.FamCompCheck3.response != "5 seconds") block.FamiliarityInstructions]
</block>

<block Familiarity>
/ onblockbegin = [values.instructnum = 5; values.trialCount = 0; values.makeFams = 1]
/ trials = [1-59 = sequence (makeFams, NextTrial)]
/ onblockend = [values.missFams = 0]
</block>

with

<expt CB1>
/ onexptbegin = [if (computer.platform != "mac" && computer.platform != "win") script.abort()]
/ onexptbegin = [values.CB = 1]
/ groupassignment = groupnumber
/ blocks = [1=Welcome; 2=HappinessInstructions; 3=Happiness; 4 = FamiliarityInstrucionts; 5 = Familiarity]
</expt>

Thanks for the quick reply, I have tried your suggested code, but unfortunately if participants get an instructional check question wrong it starts the instructions for the following block (I.e., familiarity block). Presumably, because the instructions are set up in a sequential order:

<item Instructions>
/ 1 = "1 Welcome.png"
/ 2 = "2 BackgroundInfo.png"
/ 3 = "3 HapInstr1.png"
/ 4 = "4 HapInstr2.png"
/ 5 = "5 FamInstr1.png"
/ 6 = "6 FamInstr2.png"
</item>

<picture InstructionsDisplay>
/ items = Instructions
/ select = sequence
/ size = (100%, 100%)
/ position = (50%, 50%)
</picture>
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
KempInquisit - 12/3/2020
Dave - 12/3/2020
Dave - 12/3/2020
KempInquisit - 12/3/2020

Thanks Dave, what would you suggest for the instruction questionnaire since my preferable choice was using radio buttons? 
Best, 
Kemp

I'm confused. This has nothing to do with the branching. You can use whatever question format(s) you feel most comfortable with.

What I suggest you do re. the instruction check is this:

<block HappinessInstructions>
/ onblockbegin = [values.instructnum = 2; values.trialCount = 0; values.makeHappiness = 1]
/ trials = [1-3 = Instructions; 4 = HapInstrCompQ]
/ branch = [if (radiobuttons.HapCompCheck1.response != "Level of Happiness" || radiobuttons.HapCompCheck2.response != "Faces"
     || radiobuttons.HapCompCheck3.response != "4 seconds") block.HappinessInstructions]
</block>

<block Happiness>
/ onblockbegin = [values.instructnum = 2; values.trialCount = 0; values.makeHappiness = 1]
/ trials = [1-11 = sequence (makeHappiness, NextTrial)]
/ onblockend = [values.missHappiness = 0]
</block>

<block FamiliarityInstructions>
/ onblockbegin = [values.instructnum = 5; values.trialCount = 0; values.makeFams = 1]
/ trials = [1-3 = Instructions; 4 = FamInstrCompQ]
/ branch = [if (radiobuttons.FamCompCheck1.response != "Level of Familiarity" || radiobuttons.FamCompCheck2.response != "Faces"
     || radiobuttons.FamCompCheck3.response != "5 seconds") block.FamiliarityInstructions]
</block>

<block Familiarity>
/ onblockbegin = [values.instructnum = 5; values.trialCount = 0; values.makeFams = 1]
/ trials = [1-59 = sequence (makeFams, NextTrial)]
/ onblockend = [values.missFams = 0]
</block>

with

<expt CB1>
/ onexptbegin = [if (computer.platform != "mac" && computer.platform != "win") script.abort()]
/ onexptbegin = [values.CB = 1]
/ groupassignment = groupnumber
/ blocks = [1=Welcome; 2=HappinessInstructions; 3=Happiness; 4 = FamiliarityInstrucionts; 5 = Familiarity]
</expt>

Thanks for the quick reply, I have tried your suggested code, but unfortunately if participants get an instructional check question wrong it starts the instructions for the following block (I.e., familiarity block). Presumably, because the instructions are set up in a sequential order:

<item Instructions>
/ 1 = "1 Welcome.png"
/ 2 = "2 BackgroundInfo.png"
/ 3 = "3 HapInstr1.png"
/ 4 = "4 HapInstr2.png"
/ 5 = "5 FamInstr1.png"
/ 6 = "6 FamInstr2.png"
</item>

<picture InstructionsDisplay>
/ items = Instructions
/ select = sequence
/ size = (100%, 100%)
/ position = (50%, 50%)
</picture>

Use a value then for selection and set it as needed. You already have that value in your code, so I'm puzzled why you don't use it.

<picture InstructionsDisplay>
/ items = Instructions
/ select = values.instructnum
/ size = (100%, 100%)
/ position = (50%, 50%)
</picture>


Edited 4 Years Ago by Dave
Paige Kemp
Paige Kemp
Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)Respected Member (318 reputation)
Group: Forum Members
Posts: 20, Visits: 84
Dave - 12/3/2020
KempInquisit - 12/3/2020
Dave - 12/3/2020
Dave - 12/3/2020
KempInquisit - 12/3/2020

Thanks Dave, what would you suggest for the instruction questionnaire since my preferable choice was using radio buttons? 
Best, 
Kemp

I'm confused. This has nothing to do with the branching. You can use whatever question format(s) you feel most comfortable with.

What I suggest you do re. the instruction check is this:

<block HappinessInstructions>
/ onblockbegin = [values.instructnum = 2; values.trialCount = 0; values.makeHappiness = 1]
/ trials = [1-3 = Instructions; 4 = HapInstrCompQ]
/ branch = [if (radiobuttons.HapCompCheck1.response != "Level of Happiness" || radiobuttons.HapCompCheck2.response != "Faces"
     || radiobuttons.HapCompCheck3.response != "4 seconds") block.HappinessInstructions]
</block>

<block Happiness>
/ onblockbegin = [values.instructnum = 2; values.trialCount = 0; values.makeHappiness = 1]
/ trials = [1-11 = sequence (makeHappiness, NextTrial)]
/ onblockend = [values.missHappiness = 0]
</block>

<block FamiliarityInstructions>
/ onblockbegin = [values.instructnum = 5; values.trialCount = 0; values.makeFams = 1]
/ trials = [1-3 = Instructions; 4 = FamInstrCompQ]
/ branch = [if (radiobuttons.FamCompCheck1.response != "Level of Familiarity" || radiobuttons.FamCompCheck2.response != "Faces"
     || radiobuttons.FamCompCheck3.response != "5 seconds") block.FamiliarityInstructions]
</block>

<block Familiarity>
/ onblockbegin = [values.instructnum = 5; values.trialCount = 0; values.makeFams = 1]
/ trials = [1-59 = sequence (makeFams, NextTrial)]
/ onblockend = [values.missFams = 0]
</block>

with

<expt CB1>
/ onexptbegin = [if (computer.platform != "mac" && computer.platform != "win") script.abort()]
/ onexptbegin = [values.CB = 1]
/ groupassignment = groupnumber
/ blocks = [1=Welcome; 2=HappinessInstructions; 3=Happiness; 4 = FamiliarityInstrucionts; 5 = Familiarity]
</expt>

Thanks for the quick reply, I have tried your suggested code, but unfortunately if participants get an instructional check question wrong it starts the instructions for the following block (I.e., familiarity block). Presumably, because the instructions are set up in a sequential order:

<item Instructions>
/ 1 = "1 Welcome.png"
/ 2 = "2 BackgroundInfo.png"
/ 3 = "3 HapInstr1.png"
/ 4 = "4 HapInstr2.png"
/ 5 = "5 FamInstr1.png"
/ 6 = "6 FamInstr2.png"
</item>

<picture InstructionsDisplay>
/ items = Instructions
/ select = sequence
/ size = (100%, 100%)
/ position = (50%, 50%)
</picture>

Use a value then for selection and set it as needed. You already have that value in your code, so I'm puzzled why you don't use it.

<picture InstructionsDisplay>
/ items = Instructions
/ select = values.instructnum
/ size = (100%, 100%)
/ position = (50%, 50%)
</picture>


I am still really struggling with this, as now I am getting "/ 2 = "2 BackgroundInfo.png"" displayed three times as opposed to: 
/ 2 = "2 BackgroundInfo.png"
/ 3 = "3 HapInstr1.png"
/ 4 = "4 HapInstr2.png"
being displayed once during the Happiness block.  
Attachments
Face_Happiness.1.iqx (263 views, 16.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
KempInquisit - 12/4/2020
Dave - 12/3/2020
KempInquisit - 12/3/2020
Dave - 12/3/2020
Dave - 12/3/2020
KempInquisit - 12/3/2020

Thanks Dave, what would you suggest for the instruction questionnaire since my preferable choice was using radio buttons? 
Best, 
Kemp

I'm confused. This has nothing to do with the branching. You can use whatever question format(s) you feel most comfortable with.

What I suggest you do re. the instruction check is this:

<block HappinessInstructions>
/ onblockbegin = [values.instructnum = 2; values.trialCount = 0; values.makeHappiness = 1]
/ trials = [1-3 = Instructions; 4 = HapInstrCompQ]
/ branch = [if (radiobuttons.HapCompCheck1.response != "Level of Happiness" || radiobuttons.HapCompCheck2.response != "Faces"
     || radiobuttons.HapCompCheck3.response != "4 seconds") block.HappinessInstructions]
</block>

<block Happiness>
/ onblockbegin = [values.instructnum = 2; values.trialCount = 0; values.makeHappiness = 1]
/ trials = [1-11 = sequence (makeHappiness, NextTrial)]
/ onblockend = [values.missHappiness = 0]
</block>

<block FamiliarityInstructions>
/ onblockbegin = [values.instructnum = 5; values.trialCount = 0; values.makeFams = 1]
/ trials = [1-3 = Instructions; 4 = FamInstrCompQ]
/ branch = [if (radiobuttons.FamCompCheck1.response != "Level of Familiarity" || radiobuttons.FamCompCheck2.response != "Faces"
     || radiobuttons.FamCompCheck3.response != "5 seconds") block.FamiliarityInstructions]
</block>

<block Familiarity>
/ onblockbegin = [values.instructnum = 5; values.trialCount = 0; values.makeFams = 1]
/ trials = [1-59 = sequence (makeFams, NextTrial)]
/ onblockend = [values.missFams = 0]
</block>

with

<expt CB1>
/ onexptbegin = [if (computer.platform != "mac" && computer.platform != "win") script.abort()]
/ onexptbegin = [values.CB = 1]
/ groupassignment = groupnumber
/ blocks = [1=Welcome; 2=HappinessInstructions; 3=Happiness; 4 = FamiliarityInstrucionts; 5 = Familiarity]
</expt>

Thanks for the quick reply, I have tried your suggested code, but unfortunately if participants get an instructional check question wrong it starts the instructions for the following block (I.e., familiarity block). Presumably, because the instructions are set up in a sequential order:

<item Instructions>
/ 1 = "1 Welcome.png"
/ 2 = "2 BackgroundInfo.png"
/ 3 = "3 HapInstr1.png"
/ 4 = "4 HapInstr2.png"
/ 5 = "5 FamInstr1.png"
/ 6 = "6 FamInstr2.png"
</item>

<picture InstructionsDisplay>
/ items = Instructions
/ select = sequence
/ size = (100%, 100%)
/ position = (50%, 50%)
</picture>

Use a value then for selection and set it as needed. You already have that value in your code, so I'm puzzled why you don't use it.

<picture InstructionsDisplay>
/ items = Instructions
/ select = values.instructnum
/ size = (100%, 100%)
/ position = (50%, 50%)
</picture>


I am still really struggling with this, as now I am getting "/ 2 = "2 BackgroundInfo.png"" displayed three times as opposed to: 
/ 2 = "2 BackgroundInfo.png"
/ 3 = "3 HapInstr1.png"
/ 4 = "4 HapInstr2.png"
being displayed once during the Happiness block.  

That's because for completely unclear reasons you changed the instructions trial. This is your code now.

<trial Instructions>
/ stimulusframes = [1 = InstructionsDisplay, ContinueButton]
/ inputdevice = mouse
/ validresponse = (ContinueButton)
/ posttrialpause = parameters.ISI
</trial>

This was your original code, in your first post here: https://www.millisecond.com/forums/FindPost30350.aspx

<trial Instructions>
/ stimulusframes = [1 = InstructionsDisplay, ContinueButton]
/ ontrialbegin = [values.instructnum += 1]
/ inputdevice = mouse
/ validresponse = (ContinueButton)
/ posttrialpause = parameters.ISI
</trial>

The latter is almost correct, though you should either move that to /ontrialend or -- better yet -- leave it /ontrialbegin but do

<block HappinessInstructions>
/ onblockbegin = [values.instructnum = 1; values.trialCount = 0; values.makeHappiness = 1]
/ trials = [1-3 = Instructions; 4 = HapInstrCompQ]
/ branch = [if (radiobuttons.HapCompCheck1.response != "Level of Happiness" || radiobuttons.HapCompCheck2.response != "Faces"
  || radiobuttons.HapCompCheck3.response != "4 seconds") block.HappinessInstructions]
</block>

<block FamiliarityInstructions>
/ onblockbegin = [values.instructnum = 4; values.trialCount = 0; values.makeFams = 1]
/ trials = [1-2 = Instructions; 3 = FamInstrCompQ]
/ branch = [if (radiobuttons.FamCompCheck1.response != "Level of Familiarity" || radiobuttons.FamCompCheck2.response != "Faces"
  || radiobuttons.FamCompCheck3.response != "5 seconds") block.FamiliarityInstructions]
</block>

P.S.: I know I am repeating myself, but please whenever you need to share code that requires external files to actually run, provide those files.

Edited 4 Years Ago by Dave
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search