Flip Flop logic inside a function

Trying to implement ‘flip flop’ logic inside a Function. Apparently the FlipFlop node does not work because any Function resets itself after being called.
What is the best option then?

u can r create the same functionality with booleans.

1 Like

Just answering my own question in case anyone might benefit. I think the best approach is to simply pass a Boolean created via FlipFlop to the function and use a Branch node.

Function resets itself after being called

Flip goes out of scope, aye.

What is the best option then?

Sometimes when you find yourself fighting BP, there is another simpler / better option waiting nearby. So maybe look into Macros too if you haven’t already (see how the choccy gets made by double-clicking on a Flip-Flop node to see how it works (ASSIGN). Or move the Flip-Flop logic outside the function, or use a macro that calls a function. Maybe the function can be simplified or a global var used if you have a lot of similar functions that all need to be toggled at the same time. A Multigate node might also be of interest here. :wink: