[solved] repeat cycle until keypress
Hi guys,
We are making a change blindness experiment in OpenSesame. A picture is shown, then a gray field, followed with the picture with the change and then again a gray field. This continues until the participant notices the change. When the participant notices the change, he has to press space. The reaction time is measured in the logger. Then the cycle must stop and the participant has to tell us where the change in the picture was. The problem is that the cycle has to repeat until there is a keypress, but we don't know how to do this. Can anyone help us?
Thank you!
Comments
Hi,
You could consider setting the repeat value of your change_blindness_loop very high, and using a break-if statement to break out of the
loopas soon as a response has been collected.For example, let's assume that you have an image_sequence that consists of presenting an image (defined by the variable
image) and akeyboard_responsewith a certain timeout (say 100 ms). The followingloopwill then do the trick:image1.pngandimage2.pngwill be alternately presented until thekeyboard_responsedoesn't time out.In addition, you will have to reset the
responsevariable toNoneright before theloop. You can do this with aninline_scriptlike this:This may do the trick for you. Alternatively, if you need more flexibility, you could consider implementing everything with an
inline_script.Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan,
Thanks for the tips, you helped us a lot
Hi, we're back!
Our experiment works! But now we have a problem with the logger (output).. We want to know how many cycles it took for the participant to see the change. We clicked 'correct' in the logger. First the output showed us a '0' or '1' for a correct response or not, only now it shows different values, such as '41', '0' or '23'. What does this mean? Is it a problem in excel or do we have to select different options in opensesame?
Bye bye,
Fenna
We got a tip from a friend it may had something to do with multiple keyboard response objects.. We have four keyboard responses in our experiment :ar!
Hi Fenna,
Are you sure you're looking at the right column in the output? It kind of sounds like you're looking at the
count_keyboard_responsevariable rather than thecorrect_keyboard_response.If this is not the case, could you post your script?
Thanks!