Fab Store

Branch (Conditional)

Branch is Blueprint's fundamental decision node. It evaluates a Boolean value and routes execution through either the True or False output.

Category: Flow Control Level: Beginner C++: if (Condition) { ... } else { ... }

YouTube Video Lesson (#01)

Interactive Blueprint Graph & Copyable Code

Use the "Copy Nodes" button in the graph below, then press Ctrl+V in an Unreal Engine 5 Blueprint Graph to paste the example:

Input and Output Pins

Pin Name Direction Data Type Description
(Exec In) Input Exec (White) The execution signal that starts the condition check.
Condition Input Boolean (Red) The Boolean expression to evaluate (True or False).
True Output Exec (White) Execution path triggered when Condition is True.
False Output Exec (White) Execution path triggered when Condition is False.

Use Cases

In this lesson, the Name variable is compared with "Hasan". The True path prints the matching message; the False path prints the alternative message.

  • Variable / Name Validation: Check a player name, NPC identity, or dialogue state.
  • Health & Death Check: Start the death animation when Health <= 0.
  • Inventory Check: Verify HasKey == true before opening a door.
  • Multiplayer Authority: Route logic between server and client with a HasAuthority check.

Common Mistakes

  • Heavy Tick Calculations: Avoid expensive math on the Condition pin every frame; prefer event-driven logic.
  • Double Execution: Do not reconnect both outputs into a flow that unintentionally calls the same function twice.
  • Null / Invalid Object Check: For object references, the IsValid node is usually safer and clearer than a plain Branch.

Official Resources

ESC