Hi guys! I’m designing an experiment for young children using the builder. Blue and red bricks are being shown and the children have to press a button if they see a red brick. The “story” we would like to tell them is that the goal is to build a tower (made out of red and blue bricks). I would like to give them feedback about the tower if they give a correct answer to remind them of the goal. I made a feedback where they just see a picture of the finished tower but it would be better if they actually saw the process of the tower being built.
So I would like to show different pictures in a fixed order as feedback after every correct answer. So for example after one correct answer they would see one line of the tower, after a second correct answer an other line etc. Is this possible to make? Thanks for the help in advance!
if you only want to show feedback on red bricks you could adapt this last bit to include that in your if statement:
if key_resp.corr and colour=='red': #colour is a variable in your conditions file
thisImage=feedback_images[corrCount]
image = visual.ImageStim(win, image=thisImage)
image.draw()
win.flip()
core.wait(2)
corrCount=corrCount+1
thanks for you help, I really apreciate it! I tried to use the code segments you’ve sent me, but I’m not very great at programming and it gives an error “AttributeError: Couldn’t make sense of requested image.”. I’ve uploaded the experiment file and the excel file I use. If you have time could you please look at it and help me figure out what is wrong? Example.psyexp (29.8 KB) block1.xlsx (8.8 KB)
OK so a subtle difference is that you have your feedback image in a different routine (“feedback1” in your file) whereas my example has the feedback presented in the same trial (both are totally fine!).
For your format, you will instead need the code component in the “begin routine” tab and you will want it to look something like this:
if key_resp.corr:
thisImage=feedback_images[corrCount]
corrCount=corrCount+1
Then you want the “$feedback_images” in your “image_2” component to read “$thisImage”.
Note that now you are not creating a new image object in your code because instead you are feeding the filename directly to your image component.