Branch after response


Author
Message
mel51
mel51
Esteemed Member (1.7K reputation)Esteemed Member (1.7K reputation)Esteemed Member (1.7K reputation)Esteemed Member (1.7K reputation)Esteemed Member (1.7K reputation)Esteemed Member (1.7K reputation)Esteemed Member (1.7K reputation)Esteemed Member (1.7K reputation)Esteemed Member (1.7K reputation)
Group: Forum Members
Posts: 7, Visits: 1

Hi everyone,


I'm making a study where participants see a series of statements about a person's sexist behavior.  They either click "n" to continue on to the next statement, or if they think they've seen enough about the person to make a judgment that he's sexist, they click "s".


I want "s" to cause the statements to stop appearing and show a screen that says something about them indicating that the man is sexist and asks them to press "n" to continue to the next page (which asks them about their demographics)


However, after struggling with the branch syntax for a while I managed to get it so that after "s" is pressed, the message shows up and the statements stop, but the background stimuli is still there ("press s for stop and n for next") and the "press n to continue" doesn't show up.  It's only after they press "n" that the background stimuli disappears and "press n for next" shows up.  So they end up seeing the info about them indicating that the man is sexist twice and they don't know how to continue onto the demographics screen if the instructions aren't there.


Here are the relevant parts of the script:


*****************BACKGROUND STIMULI****************



<text gonext>




/ items = ("Next")


/ fontstyle = ("Arial", 14pt)


/ position = (90, 10)


</text>



<text stop>


/ items = ("Stop")


/ fontstyle = ("Arial", 14pt)


/ position = (10, 10)


</text>



<text pressn>


/ items = ("Press 'n' to continue")


/ fontstyle = ("Arial", 14pt)


/ position = (10, 10)


</text>


****************MESSAGE****************




<text stoppage>



/ fontstyle = ("Arial", 14pt)


/ position = (50, 50)


/ items = ("You have indicated that Josh is sexist.")


</text>







*****************TRIALS********************



<trial moderate>


/ validkeys = ("s", "n")


/ stimulusframes = [1= moderate]


/ branch = [if (trial.moderate.response==31) trial.stop]


/ branch = [if (trial.moderate.response==49) trial.moderate]


</trial>



<trial stop>


/ stimulusframes = [1=stoppage]


/ validkeys = ("n")


</trial>



**********************BLOCKS**********************



<block moderate>


/ bgstim = (gonext, stop)


/ trials = [1=moderate]


</block>



<block stop>


/ trials = [1=stop]


/ bgstim = (pressn)


</block>



<block demographics>


/ trials = [1=demographics]


</block>



<expt>


/ preinstructions = (intro1, intro2)


/ blocks = [1=moderate; 2=stop; 3=demographics]


</expt>




Thanks!


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

As far as I can infer from your code snippet, you actually don't want to /branch to trial.stop in <trial moderate>. Instead you want to /stop <block moderate> as soon as "s" is pressed in <trial moderate>. <block stop> is next, which will run <trial stop>, etc. The correct way to do this then is:


<trial moderate>
/ validkeys = ("s", "n")
/ stimulusframes = [1= moderate]
/ branch = [if (trial.moderate.response==49) trial.moderate]
</trial>


[...]


<block moderate>
/ stop = [trial.moderate.response==31]
/ bgstim = (gonext, stop)
/ trials = [1=moderate]
</block>


Regards,


~Dave


mel51
mel51
Esteemed Member (1.7K reputation)Esteemed Member (1.7K reputation)Esteemed Member (1.7K reputation)Esteemed Member (1.7K reputation)Esteemed Member (1.7K reputation)Esteemed Member (1.7K reputation)Esteemed Member (1.7K reputation)Esteemed Member (1.7K reputation)Esteemed Member (1.7K reputation)
Group: Forum Members
Posts: 7, Visits: 1

Perfect!


I didn't even know that block had /stop syntax


Thank you!


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search