Making a nested loop to randomise a series of animations

(Using PsychoPy version 1.83.04 )
What are you trying to achieve?:
I have created a series of short animations using excel sheets that store the info for each frame on a line (size of object, screen co-ordinates, orientation etc). Each animation has its own excel sheet, and this is controlled by an inner loop that reads through the lines sequentially.

I then have another excel sheet with a list of the file names for the animation sheets. I am wanting builder to go through this list in a random order, locate the spreadsheet with the animation details, play the animation, and then keep looping through to play them all.

It doesn’t seem obvious how to do this without writing a code snippet somewhere, but my python is terrible and I would really appreciate some advice on what to write (and where).

Many thanks.

I figured out my own answer (most unusual event!)

I entitled the list of animations spreadsheets in my outer loop spreadsheet conditions_file.
Then it was just a case of replacing the file name for the inner loop with $conditions_file.

Simple, no python required :slight_smile:

2 Likes

Would you be willing to share the code that ended up working for this? I’m attempting to complete a similar task but am working through python code and I’m not certain how Builder built this in this case.

1 Like