Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] continue on correct keyboard response, otherwise show an error message

edited May 2014 in OpenSesame

Hi,

I'm sorry to bother you with this very basic question, but my group and I have been trying to solve this for hours now. I have a question that should be answered with a specific response (a number) and if the number is correct, continue to the next question. If the number is incorrect an error message should be displayed.

How to solve this? Thanks for your help!

Comments

  • edited May 2014

    Add the item to display on an erroneous response as normally, but in the sequence, set the Run if.. of this item to

    [correct] = 0.
    

    Below is an example to illustrate this

    Here a sound is played (through a synth item) and a red fixation dot is shown if the participant gives an incorrect response. Please not that somehow the [] have fallen away in this screenshot (I just noticed this myself). This does not appear to have any effect if I run this experiment, but the correct way to do this would be to put [] around variable names.

    Hope this helps!

    Buy Me A Coffee

  • edited 4:45PM

    Yes, this helps, I just figured it out myself :) But now I have the problem that I want to do the following, if you have time and could give a short outline I'd highly appreciate it:

    Ask a question 1. If answered correct, proceed to question 2. If answered incorrect, repeat question 1, and this as long as question is answered correctly.
    Ask question 2, if answered correct, proceed to question 3, if not repeat question 2 until answered correct. Ask question 3, accept any answer within the range of 0 - 10 as input and then stop. I got so far that question2 is showed if [correct]=1, but it wouldn't leave the loop after question 2 got answered correctly.

    In general I have a problem with breaking loops, because OpenSesame always tells me the breaking variable hasn't been defined, even though I wanted to take the correct answer of the second keylogger as a breaker. I hope this makes sense.

  • edited 4:45PM

    Figured it out myself; I'll post an explanation later if anybody should ever have the same question :)

Sign In or Register to comment.