Hi there,
I want to develop a simple experiment in which the total duration is fixed; this means that rather than fixed number of trials, what I need is fixed duration from when the experiment starts (i.e., after instructions and training trials to familiarise with the task) until it ends and in this way faster participants will do more trials. Is there any way to do this using the builder? By now I really couldn’t come up with any idea on how to do this using the builder. Any input is more than appreciated!
This might only be doable in the builder using code-blocks.
You could save the time of the start of the first trial. Either do this in the “End Routine” tab of the last instruction, or in the “Begin Routine” tab of the trial. The second option would however require some “if firstTrial == True:” satatement so it isn’t reset every trial!
Then you can just check each frame wether the time is up, and if that is true, force the End of the routine if it is.
To get out of the trial loop you can trigger a “break” statement in the “Begin Routine” tab, as it is plced before the “frame loop” of the trial. So all in all it would look a bit like this:
Hi,
thanks that was a very helpful and clear answer. It all makes sense, I’ll implement it and if I have problems I’ll post them here. Of course if anyone wants to add other methods or suggestions that may be useful in general, those are more than welcome.