Hello there, this is my first post, and my first fumbling attempt at making an experiment in PsychoPy. I’ve read a book that introduced me to Builder, and I am familiar with writing some basic code in Python, but now that I am programming my own experiment, I find that I need to know a lot more about how the code works. So before I get on to my real question, if anyone has suggestions for how to get acquainted with code that goes with making experiments - tutorials, youtube clips, walkthroughs, books - I’d be happy to hear them.
Now for my question. I have six different trial types (or rather, routines), and I would like to be able control how the experiment progresses from one trial (routine) to the next. For now I am only managing to play them in sequence. To make this easier to imagine, it is a paradigm where three players, two of which are digital, toss a ball to each other. Each toss is a routine, because I need a loop of images to run from a conditions file, forming a movie sequence.
For some trials, the choice of the next trial should be automatic and probabilistic, but for others it should depend on the response given. When the player is the experimental participant, they can choose whether to toss left or right. When it is one of the other players, they also toss to one of the other players based on a random choice.
In both cases, there should be an event at the end of the trial, either a response (‘left’ or ‘right’) or a random choice (again ‘left’ or 'right) which determines which player gets the ball next - i.e. which trial should play next. But how do I tell PsychoPy to go to this routine? I can imagine having something like ‘player 2’ and telling it to ‘go to player 2’, but how is this done?