Logging Positions of Randomized Images

Hello there,

I currently have an experiment in which pairs of image stimuli, “Odd” and “Even”, are displayed in random order to the user. In each routine, the sides of the screen that the two images are displayed are randomized; the images are either positioned at [-0.5, 0] or [0.5, 0]. The user guesses which side the “Odd” image is on by pressing “L” or “R”.

I was wondering how I could program the experiment to record the side the “Odd” image is displayed on in each trial, and to log whether each of the user’s responses is correct. I know that there is the “store correct” function for keyboard responses, but I need something that is updated live with each trial. Many thanks!


Shuffle Code

thisExp.addData('OddX',positions[0][0])

Brilliant! You rock!

1 Like