Play sound at random points during experiment
I am trying to have a click sound play at random points during the training portion of my experiment. The training consists of words being individually presented visually on the screen. When the participant's hear a click sound, they have to press a key as fast as possible, and then we will record the time taken for them to press the key.
I have one variable in my loop table with 20 levels (the number of words presented, named "wordorder"). I have then included an inline script within that to try and get the click sound to play randomly 5 times while the words are being presented. This is what I have so far:
I know I am doing something wrong as the clicks are playing throughout all 20 words instead of at 5 random words, but I am not sure how to resolve the issue.
Thanks for your time