Logging the variable of "Loop Value at Point of Breaking"
Hello all,
I have a loop that is running values in a table sequentially. When a certain key is pressed, the loop breaks. I would like to log the value at which the loop breaks as a variable. I would like this variable to be logged every the loop run and is broken. For example, the loop table has values 60, 70, 80, 90. If it is run 3 times, and is broken at the value of 60, value of 80, and then value of 60, I would like the data to output first run = 60, second run = 80, third run = 60.
Any help you all can provide is much appreciated.
Comments
Hi,
You can add a
inline_scriptright after theloop. In its runphase you can put somehting like:var.value_at_break = var.value. If you have a logger item after that, it will save the variables (you can also manually log inside the inline script: https://osdoc.cogsci.nl/3.2/manual/python/log/Eduard