I’ve been trying to provide feedback to participants after they select one of two pictures on every trial, using the following code from Builder - providing feedback:
# Initialize components for Routine "feedback" msg=' ' #if this comes up we forgot to update the msg! text = visual.TextStim(win=win, name='text', text=msg) # -------Start Routine "feedback"------- if not key_resp.keys : msg="Failed to respond" elif key_resp.corr: #stored on last run routine msg="Correct!" else: msg="Oops! That was wrong"
Not surprisingly, my code fails to update the content of
msg during the first trial, so I always get an empty
' ' message as feedback after the first response. I was wondering whether there’s any solution to this problem, i.e. a way of initializing the components of the feedback route without having to define
msg right away?