FlipFlop problem, constant switching from A to B to A

Hallo,
I am new to Unreal Engine and have a problem with the FlipFlop node.
When I execute the node my Test variables is constantly changing from True to False to True…
When I execute it again it is set to True.
When I execute it again it is switching from True to False to Ture… again.
And so on.
In another Project I tried the same script and it was working without problems.
I am looking forward to a quick reply.
Thank You!

Use ONE of the attached setups

133596-flipflop.png

Thank You for your quick reply.
But this has not changed anything.
When I press E the Test variable is still constantly switching from True to False.

hm.just testetd again in 4.14 and it does not happen in my test. can you set a break point on the “set test” and do a search if you’re not setting the variable anywhere else? (the flipflop works also - just wanted to be sure which i was postet the 2 alternatives). I now it is ugly, but try it in a new blank 4.14 project - I’m sure it works on your pc to. maybe test a other key?

ah whait - I think the problem is how you’ve setup your event tick! Don’t do that this way! create a timer on begin play and do your stuff in this timer. the way you’ve set it is delaying the tick which is not a good idea :slight_smile:

feel free to provide some more input what you ’ re willing to do as it looks som kind of wired the way it is setup :slight_smile:

Attached Screenshot works

Hello Jakob_G,

This is working as intended. The flipflop node is meant to alternate between A and B each time that it is called. I have provided a screen shot below of the tool tip that is given for the node. I have also included a link to the flow control documentation. This part of the docs provides information on the nodes used to control the flow of execution in your blueprints. Please be sure to check documentation for intended behavior before filing a bug report. I hope that this helps.

Link (docs): https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/FlowControl/

Tooltip:

133598-flipfloptooltiphelp.png

Make it a great day

Ok, Thank You for Your answer.
I copied the script from the PlayerCharacterBP to the PlayerControllerBP and now it is working perfectly.
Why isn´t it working in the Player CharacterBP?
Thanks in advance for an answer.

Thank You for Your reply.
I know how a FlipFlop works.
But the problem is when I press the E key once the variableis is not stopping changing from True to False to True…

I tried again without a delay node:

but still the same problem.
When I press the E key once the variable is constantly switching from True to False to True…

I realized that my problem isn´t the FlipFlop or the variable, it is just the print string node. Because when I add a watch to the Test variable the value is correct. Somehow the print string node is outputting the Test veriable and a True at once.
sorry for my bad english, I hope you understand what I mean

When you press an action input it doesn’t trigger the Pressed pin a single time. Instead, it keeps firing.

Try using a DoOnce, with the reset connected to the Release, and a set(not) at its exit, and it should flip your variable only once. Otherwise, constantly changing from true to false and so on is exactly the expected behaviour of your setup, and I don’t see how it could be working on a different project.

Thank you!
This worked for me.