I have an (7,7) array with instances with values of 1 or 0. I need to apply a function based on all instances that have a 1 value on them. I tried tokenat, Compare Value, Compare Current Value, For each element, but couldn't find a way to say:
For each instance with value 1 --> get the X and Y of each of them
--> set variable a to X
--> set variable b to Y
--> Call function (that uses each a and b obtained)
My objective: if an instance of the array has a value 1, all instances around it must get a value floor(random(0,2)). If it turns out as 1, the process repeat again until a limit (a global variable) is achieved. If the limit is not achieved, the process needs to repeat again at each instance with a 1 value.
Do you have any idea of how I could manage that?
Anyway, thank you for your time!