Daniel Falci
Sign in Buy the course

Branch node in Blueprints: if true, do this; otherwise, do that

The Branch node tests a Boolean condition: if it is true, execution continues through the True pin, and if it is false, through the False pin. It is one of the nodes used most often in Blueprints, and it is the visual version of if this happens, do that; otherwise do something else.

See the course Watch a free lesson

From the course

Taken from the hands-on project of the course; the lessons show every step on video.

What does the Branch have?

An execution input, a Boolean data input where you set the condition (true or false) and two execution outputs: True and False.

How do I test it?

How do I use a variable instead of the checkbox?

Create a Boolean variable, for example MyCondition, set its default in the Details panel, Get it and connect it to the Branch condition. You can also change it in real time during gameplay with a Set node.

Can I combine Branches?

Yes: a Branch followed by another Branch, or a Branch right after a Switch. The lesson's practical example is a TV power button: if the TV is on, turn it off; if it is off, turn it on, like a remote control button.

Free PDFs that go with this page

One-page guides made from the lessons, sent by e-mail.

Frequently asked questions

What does the Branch node do?

It sends the execution through the True or False pin depending on a Boolean condition.

What type is the Branch condition?

A Boolean, true or false.

Can I use a variable as the condition?

Yes. Connect a Boolean variable to the condition pin.

Related guides

See the course