Hello! I have this code right now:
mouse = psychopy.event.Mouse(
I want to randomize the starting position of the mouse each time. My first thought was to create a list of positions from where the code randomly chooses, but I am not sure how to approach this. I would appreciate any help. Thank you!
First create some list of positions and randomise it:
from psychopy import event
from numpy.random import shuffle
# initialise some list of possible starting values in whatever way you need:
starting_positions = [[3000, -500], [3000, 500], [-3000, -500], [-3000, 500]] * 2 # etc
# randomise it:
# create a mouse:
mouse = event.Mouse(visible = True)
Then whenever needed, grab an entry from that list:
Awesome! You made it so easy. Thank you so much.