Hello,
I don't *think*
trials.finished = True
will have any effect until the end of the current loop iteration, whereas
continueRoutine = False
is checked on every screen refresh and so will terminate the current routine almost immediately.
So if in Routine 1, you do both of the above, the net effect is that Routine 1 will end immediately, but Routine 2 will run once, and only then will the loop terminate, before Routine 1 runs again.
In your case, you will want to set "trials.finished = True" so that the loop won't run again, but you will also need to set "continueRoutine = False" in *every other* routine within that loop.
e.g. in another code component in Routine 2, you could put something like this in its "begin routine" tab so that Routine 2 never even starts if you have set the loop to end in the previous routine:
if trials.finished:
continueRoutine = False
Regards,
Michael
> On 20/12/2015, at 02:36, PULKIT SINGHAL <
singhal...@gmail.com> wrote:
>
> I have two routines in a loop and Routine 1 is a code component. Based on the condition in the code component, I terminate the loop.
>
> But when it is terminated, I want that Routine 2 should not be run. It should be skipped. But as of now when I have set "trials.finished = True" in Routine 1 code component , the loop does end but it ends up executing Routine 2 which I want to skip.
>
> Is that possible from the builder? I think it should be but somehow I am missing something here. I have tried both "trials.finished = True" and "continueRoutine = False " but in both cases Routine2 is not skipped. Thank you.
--
Michael R. MacAskill, PhD 66 Stewart St
Research Director, Christchurch 8011
New Zealand Brain Research Institute NEW ZEALAND
Senior Research Fellow,
michael....@nzbri.org
Te Whare Wānanga o Otāgo, Otautahi Ph:
+64 3 3786 072
University of Otago, Christchurch
http://www.nzbri.org/macaskill