Multiple FlipFlop

Hey Everyone,

Quick question, I have a selection of buttons on a menu and I have assigned spawned actors to them. At the moment when you press a button an object is spawned. If you press it again its destroyed and if you press another button another object is spawned and the previous destroyed. This all works fine.

The issue I have is when you press a button its actor is spawned, if you then go on to another and return to a button or the same button twice it needs to be pressed twice ( I am guessing it continues where it left off with the flip flop)

Any help or advice would be really appreciated.

Aaron

Are you using any of these nodes ? If yes, in what order?

If I understand what you’re trying to do…

You need a second set of flipflops and a callback.

Rereading your question, this may not be what you were asking about.

You want to Spawn on the first use of a button…

Despawn that and spawn another - on each subsequent use of the same (or other) buttons?


If that is the goal, you don’t actually need a flipflop.

You can just validate the last spawned actor …

If it exists, destroy it.

And whether it exists or not, spawn the next one.

Nice one, thanks for that. It seems to be much more stable and consistent now.

The only other issue is the double clicking. Button A & B, when I click A, the A actor is spawned. When I then click B, the A actor is removed and I have to click B again to spawn the B Actor. If I then click A, the B actor is removed and I have to again click again to spawn the A actor.

Any Ideas how to fix this?

Just the Get Player Controller & Set, am I missing a node?

Are you intending to hide the mouse or show it as they spawn?

I don’t see any reason it would fail to work on every other click.
You could simplify it down a bit, but I don’t know that it will help.

I’m using Mouse Release out of habit. You may try changing to On Click or Mouse Down to see if that helps the problem.

U can use MultiGate