Skip to content
Discussion options

You must be logged in to vote

Hi @DanielBruijn, yes, you can put your break trial inside of a conditional timeline, and then put that conditional timeline inside the trial procedure that uses timeline variables.

When I want to add a break every N trials, what I do is create a global variable to count the trials. In the conditional function, I check if there's a remainder when dividing the current trial count by N - if not then run the break trial, otherwise don't.

So altogether it might look something like this:

var trial_count = 0;

var break_trial = {
  type: 'html-keyboard-response',
  stimulus:  "<p style='font-size: 25px'>Time to take a break!</p>" + 
          "<p style='font-size: 25px'>Take a rest for about a …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@DanielBruijn
Comment options

@DanielBruijn
Comment options

Answer selected by DanielBruijn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants