How to change Switch's value by user's interaction? Please, help)

Hello evvvveryone!

I really can’t get how to change Switch value by user’s interaction.

For example, i have 3 Bang IObox’es and one Switch with 3 input counts.

I want to understand how to build such logic: Then user activates first Bang, Switch’s uses 0 value.
Then user activates second Bang, Switch’s uses 1 value.
Then user activates third Bang, Switch’s uses 2 value.

I’ve attached the simple patch. By pressing different Bang IObox’es, user can select relevant folder. How to do it?

Or maybe there is another more logical way?

Thank you so much!

custom-switch.v4p (16.2 kB)

multiflipflop to the rescue! ;)

custom-switch_multiflipflop.v4p (17.2 kB)

m4d, thank you so much! It is much much easer than I thought!)