Okay, I understand, sort of. It’s still not a real world example but the screenshot makes sense. You want a function that can be called from a list of functions. I haven’t needed that before but if it’s important to you, submit a feature request and include a link to this topic.
I’d rather have a Case statement block. I can see all sorts of uses for that.
This seems less efficient for a situation like mine where I have to create a new else if to my blocks if I add a new function for some reason.
In my example I just create a new function, add it to my list of functions, and then my existing for each item j block will automatically pick it up and do it’s job.
A real world example is I have functions that run depending on a random number.
If RNG returns 1, then run Fx1
If RNG returns 2, then run Fx2
And so on.
I don’t want to build an if block with if, else if1, else if2, else ifₙ, (where ₙ could be 100). Then I have to add the function manually underneath
I’d much rather append a list of functions and list of circumstances and let my for each, or count by i blocks handle it automatically.
Functions have a mutator( blue Gear icon )
If you simply click it a pop up appears and you can add input fields.
Then in the execute function block the input Will appear where you can add your variable “j” block.
If you have the buttons in a row or column then you can check to see if they are #1, #2, or #3 in the list of buttons in that row/column using the “find first occurrence” block.