Getting code component to call conditions file values

Hi there,

I was wondering if it would be possible for a code component to call values from the conditions file of a loop. In my conditions file, I have two pertinent columns: “ForestDuration” and “SnowDuration”. For the following code component, which runs before each trial, what could I do to make it call the ForestDuration and SnowDuration values from the pertinent row in the conditions file?

positions= [[-.5,0],[.5,0]]
shuffle (positions)
time = [None, None]
if positions[0][0] == -0.5:
time[0] = 0
time[1] = # respective ForestDuration value
elif positions[0][0] == 0.5:
time[0] = # respective SnowDuration value
time[1] = 0

For instance, we’re running through the trial in which values from row 3 are being called. This means the code will call “6” for time[1] or “9” for time[0].

Many thanks! Your support means a lot!


Image 1