Task should stop, how?


Task should stop, how?

Author
Message
ChristineH
ChristineH
Associate Member
Associate Member (140 reputation)Associate Member (140 reputation)Associate Member (140 reputation)Associate Member (140 reputation)Associate Member (140 reputation)Associate Member (140 reputation)Associate Member (140 reputation)Associate Member (140 reputation)Associate Member (140 reputation)

Group: Forum Members
Posts: 6, Visits: 21
Hello, 
I have a task with 10 trials, and participants should have the possibility to say after each trial if they want to go on or not. Each trial is a picture with a sound, and the question if they want to go on. If they go on, they should go to another block where they have to answer three questions. If they listen to each of the 10 trials, they will do the three questions also. 
I have managed to make a trial with the picture and the sound, but the question gives me trouble. If I make it a separate trial with a Likert scale (with the options yes/no), it does not count the response. If I add the question to the trial and say the participants have to press a certain key, it does not work. 
So, basically, my script runs, but not according to my rules. I have specified the /stop and /batch in the <block.
Also, I had managed before that it stops, and that they go on to the questions, but then the questions would run again. 

I have searched for this in the discussion forum, but nothing came up. Can anyone point me to the correct thread? Or to the correct demo? 
Dave
Dave
Supreme Being
Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)

Group: Administrators
Posts: 9.8K, Visits: 46K
ChristineH - Sunday, April 7, 2019
Hello, 
I have a task with 10 trials, and participants should have the possibility to say after each trial if they want to go on or not. Each trial is a picture with a sound, and the question if they want to go on. If they go on, they should go to another block where they have to answer three questions. If they listen to each of the 10 trials, they will do the three questions also. 
I have managed to make a trial with the picture and the sound, but the question gives me trouble. If I make it a separate trial with a Likert scale (with the options yes/no), it does not count the response. If I add the question to the trial and say the participants have to press a certain key, it does not work. 
So, basically, my script runs, but not according to my rules. I have specified the /stop and /batch in the <block.
Also, I had managed before that it stops, and that they go on to the questions, but then the questions would run again. 

I have searched for this in the discussion forum, but nothing came up. Can anyone point me to the correct thread? Or to the correct demo? 

This should be rather straightforward:

<expt>
/ blocks = [1=a]
</expt>

<block a>
/ stop = [trial.go_on.response == "no"]
/ trials = [1-10 = sequence(stimulustrial, go_on)]
/ branch = [block.b]
</block>

<block b>
/ trials = [1-3 = questionnaireTIC]
</block>

<trial stimulustrial>
/ stimulusframes = [1=stimulus]
/ validresponse = (0)
/ trialduration = 1000
</trial>

<trial go_on>
/ stimulusframes = [1=go_on_q, yes, no]
/ inputdevice = mouse
/ validresponse = (yes, no)
</trial>

<item questionnaireTIC>
/1 = "Question1."
/2 = "Question2."
/3 = "Question3."
</item>

<likert questionnaireTIC>
/ anchors = [1="Not at all true"; 2="Hardly true"; 3="Moderately true"; 4="Exactly true"]
/ stimulusframes = [1= questionnaireTIC]
/ mouse=true
/ numpoints=4
/ position= (50, 50)
/anchorwidth = 150
</likert>

<text questionnaireTIC>
/ items = questionnaireTIC
/ size = (1000px,100px)
/ position = (50, 40)
/ halign = center
/ select = sequence
</text>

<text stimulus>
/ items = ("Placeholder")
</text>

<text yes>
/ items = ("Yes")
/ position = (40%, 70%)
</text>

<text no>
/ items = ("No")
/ position = (60%, 70%)
</text>

<text go_on_q>
/ items = ("Do you want to go on?")
</text>




ChristineH
ChristineH
Associate Member
Associate Member (140 reputation)Associate Member (140 reputation)Associate Member (140 reputation)Associate Member (140 reputation)Associate Member (140 reputation)Associate Member (140 reputation)Associate Member (140 reputation)Associate Member (140 reputation)Associate Member (140 reputation)

Group: Forum Members
Posts: 6, Visits: 21

Dear Dave, 
Thank you so much! It worked very well!

I was wondering why I do not have to say that after the 10 trials, they also go on to the second block? I do not specify the second block in the <expt, but somehow if I follow all 10 trials, I still also end up with block b first, before going on to a block that I did specify in <expt. 

So in below, why is it only 'if you say no you go to block b" and not also "or if you do all 10 trials you go to block b"? 

<block a>
/ stop = [trial.go_on.response == "no"]
/ trials = [1-10 = sequence(stimulustrial, go_on)]
/ branch = [block.b]
</block>

Best,
Christine 
Dave
Dave
Supreme Being
Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)

Group: Administrators
Posts: 9.8K, Visits: 46K
ChristineH - Monday, April 8, 2019

Dear Dave, 
Thank you so much! It worked very well!

I was wondering why I do not have to say that after the 10 trials, they also go on to the second block? I do not specify the second block in the <expt, but somehow if I follow all 10 trials, I still also end up with block b first, before going on to a block that I did specify in <expt. 

So in below, why is it only 'if you say no you go to block b" and not also "or if you do all 10 trials you go to block b"? 

<block a>
/ stop = [trial.go_on.response == "no"]
/ trials = [1-10 = sequence(stimulustrial, go_on)]
/ branch = [block.b]
</block>

Best,
Christine 

<block b> follows <block a> in either case, per the unconditional /branch in <block a>:

<block a>
/ stop = [trial.go_on.response == "no"]
/ trials = [1-10 = sequence(stimulustrial, go_on)]
/ branch = [block.b]
</block>

The /branch means that after <block a>, <block b> is invoked --  it does not matter how or when <block a> ends, i.e. whether you end <block a> prematurely by responding "no" or whether you complete all 10 trials, <block b> will run next.



ChristineH
ChristineH
Associate Member
Associate Member (140 reputation)Associate Member (140 reputation)Associate Member (140 reputation)Associate Member (140 reputation)Associate Member (140 reputation)Associate Member (140 reputation)Associate Member (140 reputation)Associate Member (140 reputation)Associate Member (140 reputation)

Group: Forum Members
Posts: 6, Visits: 21

Ah, of course! Thank you so much for your help Dave!
Christine 
GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search