Hi, I’m completely new to psychopy and coding in general and trying to create an online version of the Iowa gambling task.
I have implemented 4 images of cards successfully and also key responses ‘a’,‘b’, ‘c’ and ‘d’ corresponding to which card they wish to select. What I then want to happen is if the key a is pressed, for example, the amount of money earnt/lost is displayed. what I have done so far is insert a loop in which I have imported conditions files with 4 parameters called ‘deck_a’, ‘deck_b’, ‘deck_c’ and ‘deck_d’ and in each row are the consequences of each selection made.
so I have my trial and a loop around that. i have then inserted a ‘feedback’ routine to be included in the loop after the trial so that is shows money earnt/lost.
in the feedback routine, I have inserted a text component which only starts if resp_a (pressing the letter a) is completed and it shows the money earnt/lost. i did this by putting $deck_a in the text box. i repeated this for all response a,b,c,d but the problem is that all text shows no matter what key is pressed. in my feedback routine i also have another text which constantly shows press space to continue and key response which only allows space to force end of routine and loop back round.
this worked when i trialled it with only one image but now i am working with 4, i am struggling
i would like to know how to get only the money earnt or lost through selection of cards shown if a certain key was pressed.
i understand i need a coding component but not sure where to start any help would be appreciated if you need any more information i am happy to provide