Skip to content
Discussion options

You must be logged in to vote

so i got it to work, but the loop only executes once. how do i make it loop until there is a correct response? here is the updated code:

const practice_trial_3 = {
  timeline: [
  {type: 'audio-keyboard-response',
  stimulus: 'GatingStimuli_Dollar.wav',
  response_allowed_while_playing: false,
  trial_ends_after_audio: true,
  post_trial_gap: 250
  },
  { type:'html-button-response',
    stimulus: ["Press OK to move on, or Listen again to replay the sound"],
    choices: ['OK', 'Listen again'],
    post_trial_gap: 500,
    on_start: function(trial) {
      if (repeated) {
        trial.choices = ['OK'];
      }
    }
  }]
}

const practice_response_trial_3 = {
  type: 'survey-text',
  que…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@becky-gilbert
Comment options

@rbruno1
Comment options

@becky-gilbert
Comment options

Answer selected by rbruno1
Comment options

You must be logged in to vote
1 reply
@rbruno1
Comment options

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