Flip Flop node in Blueprints: alternate between A and B
Flip Flop alternates between two execution outputs, A and B, each time it receives a pulse. The first time it runs A, the second B, then A again. It is the natural node to turn a light on and off with the same key. A data output, Is A, tells whether pin A or B ran.
From the course
Taken from the hands-on project of the course; the lessons show every step on video.
What are its pins?
One execution input, two execution outputs, A and B, and a data output called Is A, which is true when pin A runs and false when pin B does.
What is it used for?
To alternate a state. When you press a button or key the light turns on through pin A; press the same button again and it turns off through pin B.
How do I test it?
- Use an event for the right mouse button as the trigger, enabling input from the start of gameplay.
- Connect a Print String with lightsOn to output A and lightsOff to output B.
- Compile, save and play. Each right click alternates between lightsOn and lightsOff.
Where else does it appear?
The course uses it in its interactive project to switch lights on and off with one key: A turns the light on, B turns it off.
Free PDFs that go with this page
One-page guides made from the lessons, sent by e-mail.
- Flow control nodes — Branch, Switch, loops and gates on one page: what each node does and which pins to know.
- Blueprint Cheat Sheet — A free one-page PDF for Unreal Engine 4/5, made from the lessons of the course. Keep it next to your editor while you learn.
- Free PDFs
Frequently asked questions
What does Flip Flop do?
It alternates the execution between its A and B outputs each time it is triggered.
What is the Is A output?
A Boolean that is true when output A ran and false when output B ran.
When should I use it?
To toggle something with one trigger, such as turning a light on and off.