Howdy, Stranger!

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

Supported by

How to present a stimulus base on the correct and incorrect response?

Hi everyone.

I'm working with a small experiment, but I had problems with the logic to put a specific stimulus base on the response of the participant. I would like to do the following steps:

  1. I have four trials, the two ones with same delay but different amount, and the two others with different delay but same amount.
  2. If the participant choose the option on the right side (pressing M keyboard), that is correct (because s/he can win more with the same delay) and s/he can pass to the next trial.
  3. If the participant choose the option on the left side (pressing Z keyboard), that is incorrect and the same trial must be presented until 4 times more (as a limit if the wrong answer is presented). If the same trial is presented 5 times, the next trial must start and so on.
  4. I would like to save how many times a trial was presented and the participant's response in each trial.

I'm thinking to use the following structure, but it doesn't work.


  • Hi Gisel,

    I would use inline_scripts and Python coding to impement it (not sure whether it possible only with premade items).

    (1) In your trial loop table, you should jhave variables that define the trials, i.e. amount, delay, correct_response (whatever else you need). Every line should be one trial.

    (2) Inside the loop put a sequence that has (at least) an inline_script in it. In this script, you define the forms (see the documentation on

    (3) Once you hvae set up the forms, you can wrap their execution in a loop that keeps on looping until the form has been executed 4 times, or the correct response has been given. Keeping track of the repetitions is then trivial.

    Does that help? Try to get started and if you get stuck anywhere, feel free to ask again.


Sign In or Register to comment.