What can I use that is similar to flip flop but with three or more outputs?

Hello,

I am currently using a system that allows me to switch between multiple skeletal meshes when I press a button. The system has only needed 2 so far which is why a simple flip flop when the button is pressed did the trick. However, I now need to have more meshes and was wondering what the simplest way to implement this would be. What node could provide this in a similar way to flipflop?

Cheers.

3 Likes

Perhaps Multigate is what you need. It can have any arbitrary number of pins and every time the gate is entered it will increment the index of the execution, starting from exec 0 until it reached the last exec index, unless otherwise specified.

2 Likes

Will it loop back to 0 once it hits the maximum index?

Yes, if you set the boolean paramater Loop to true.

Relying on the built-in nodes for this isn’t particularly robust overall.

You need some variable that keep some state. Typically, that will be a Variable on your blueprint, of type integer.
Then, do something like “add one to Variable, and modulo with the number of items you want” followed by either a Select (for control flow) or just “get nth item in array” if all you’re doing is selecting an object/asset.

1 Like

This was exactly what I was looking for, thank you!

1 Like