- Home /
Outputting data to CSV file from multiple lists at specific Headers in the CSV?
I have a CSV File that creates 3 Headers per Trial (Level) that the player goes through.
Trial 1: Time, Position, Click
Trial 2: Time, Position, Click
Trial 3: Time, Position, Click ... so on and so forth.
Click is when they decided to move by clicking a button.
During run time for each Trial, I Instantiate an Object that has 3 lists: List Type Float of time, List Type String of position, List Type of string of click. These lists add information from the player object corresponding with the player's time, position, and click. When the player starts a new trial I do the same thing with a new Instantiated Trial Object with newly reset player object time, position, and click.
When all Trials are completed I add ever instantiated Trial Object to an object master list attached to the player.
I have a CSV write script which I also call when all the trials are completed that writes information row by row at the cell index of the specified header, which are the ones mentioned above.
How can I loop all the first elements in all trials in the master list at each corresponding index in the header column and then do the same for each element following?
This is what I have tried so far: