Knowledge base
Knowledge base
Knowledge base
Free, anonymous browsing of Unreal Engine Blueprint examples, node references, and best practices. The same content the WoalzCraft plugin uses to generate Blueprints.
22 results for switch
Variables: CurrentState (your EState enum: Idle, Patrol, Chase, Attack, Dead). EventTick or custom Update event → Switch on EState(CurrentState) → Idle: [idle logic] → Patrol: [patrol logic] → Chase: [chase logic] etc. State transitions via custom events: OnEnemySpotted → SetVariable(CurrentState=EState::Chase). OnEnemyLost → SetVariable(CurrentState=EState::Patrol). OnDamaged → Branch(Health<=0) → True: SetVariable(CurrentState=EState::Dead). Key: Switch On Enum node — connect enum variable to the input, each value gets an exec output pin.
Alternates between A and B output pins on each execution. Useful for toggle switches and ping-pong logic.
Routes execution based on the value of an integer, name, or enum. Cleaner than chained Branches for >2 outcomes.
Pattern: WBP_MainMenu with WidgetSwitcher containing panels (Main, Options, Credits). Buttons: OnClicked → SetActiveWidgetIndex(WidgetSwitcher, PanelIndex). Play button: RemoveFromParent → OpenLevel(GameMap). Quit: QuitGame. Level BP BeginPlay: CreateWidget(MainMenu) → AddToViewport → SetInputModeUIOnly → SetShowMouseCursor(true).
A named set of fixed values (e.g. EWeaponType: Pistol/Shotgun/Rifle). Pairs well with Switch on Enum.
Macro. Enter only passes through when gate is open.
GateUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoMacro from StandardMacros. Alternates A→B→A→B.
FlipFlopUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoBooleanNOTUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoBooleanORUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoOR=BooleanOR, NOT=Not_PreBool, XOR=BooleanXOR
ANDUE 5.4, 5.7updated 2mo ago