Howdy, Stranger!

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

Supported by

if statements and image_buttons

I want to make a conditional statement based on which image_button is selected in a form. For example, if image A is selected, I would like the program to play sound 1, if image B is selected, I would like the program to play sound 2.

I think the issue is that when image_buttons are selected, the response is coded as yes or no. It seems that in the sequence item, you can't make if statements based on yes/no responses.

This got me wondering if overlaying a touch response on the form would work, but this quickly broke what I put together.

I know this is possible with sketchpad items, but it seems like forms would give me easier control of the placement of images since it uses a grid system rather than a coordinate system. Furthermore, defining the correct clicks on an image in sketchpad is difficult. I can do it with circular stimuli, but haven't figured out how to do it with rectangular stimuli.

Any suggestions?

Comments

  • Hi Darby,

    It seems that in the sequence item, you can't make if statements based on yes/no responses.

    Why would that be?
    In a sequence you can specify all kinds of conditionals in the run_if field for a specific item. In your case it probably would be something like [response] = 'yes'. Have you tried that?

    Eduard

    Buy Me A Coffee

Sign In or Register to comment.