BlueprintPseudocode guide

Execution flow

Indentation shows what runs inside what. Reroute nodes are skipped, so a wire through a reroute reads the same as a direct one.

Branch

A Branch becomes if / else. When only False is wired, the condition is negated and there's no else.

event OnHit()
    if (IsDead)
        PlayDeath()
    else
        TakeHit()
Only False wired
    if (!IsDead)
        TakeHit()

Is Valid

The Is Valid macro (the one with the question mark) reads like a Branch on IsValid(...), and so does Is Valid Class. So does a variable Get converted to a Validated Get, on the variable it gets: if (IsValid(Target)).

event OnInteract(Actor* Target)
    if (IsValid(Target))
        Target.Use()
    else
        ShowHint("Nothing to use")

Cast

When only the success pin is wired, the flow stays flat and a note says which outputs lead nowhere. When Cast Failed is wired too, both outputs become blocks.

event OnOverlap(Actor* OtherActor)
    BP_Enemy* AsBPEnemy = CastToBP_Enemy(OtherActor)  // nothing on: Cast Failed
    AsBPEnemy.TakeHit(10.0)
Both outputs wired
    BP_Enemy* AsBPEnemy = CastToBP_Enemy(OtherActor)
        [then]
            AsBPEnemy.TakeHit(10.0)
        [Cast Failed]
            ShowHint("Not an enemy")

Sequence, Switch and other nodes with several outputs

The node gets its own line, then one block per wired output, labelled with the pin name in brackets. Outputs with nothing wired are left out. A Switch names them in a note on its line, so a case added to an enum later shows up in a diff.

event OnOpen()
    Sequence()
        [Then 0]
            OpenDoor()
        [Then 1]
            GameplayStatics::PlaySound2D(/Game/Audio/DoorCreak.DoorCreak)
Switch
    SwitchOnEWeaponType(WeaponType)  // nothing on: Pistol
        [Rifle]
            FireRifle()
        [Shotgun]
            FireShotgun()

Several inputs: Gate, Do Once, Do N, MultiGate, Timeline

A node with more than one execution input is written as a call on the input a wire enters, with the node's settings as arguments: Gate.Enter(StartClosed=true). Its wired outputs follow as blocks, since they run only when the node lets them through. An input that only changes the node's state, such as Open, Close or Toggle on a Gate, or Reset, is one statement: Gate.Open().

Two nodes with one title are numbered, DoOnce and DoOnce_2. An input pin with no name in the editor is written as the file saved it: DoOnce.execute(StartClosed=false).

event OnStep()
    Gate.Enter(StartClosed=true)
        [Exit]
            OpenDoor()

event OnLever()
    Gate.Open()

Timelines

Every input of a Timeline is a call on it: DoorTimeline.Play(), DoorTimeline.Reverse(). What it fires runs later, whichever input started it, so it is written once, as a timeline of its own after the events. Its header ends with its length and the settings that are on: [Length=2.0, AutoPlay, Loop]. The keys of its tracks are not shown.

event OnOpen()
    DoorTimeline.Play()

event OnClose()
    DoorTimeline.Reverse()

timeline DoorTimeline  [Length=2.0]
    [Update] => (DoorTimeline.Direction, DoorTimeline.Alpha)
        SetDoorAngle(DoorTimeline.Alpha)
    [Finished] =>
        GameplayStatics::PlaySound2D(/Game/Audio/DoorClosed.DoorClosed)

Two wires into one node: labels and goto

When several execution wires lead to the same node, it gets a label (L_ plus its title) the first time it's written. Every other path that reaches it says goto that label. This also shows wires that loop back to an earlier node.

event OnTargetHit(bool Headshot)
    if (Headshot)
        AddScore(50)

        L_PlaySound2D:
        GameplayStatics::PlaySound2D(/Game/Audio/Ping.Ping)
    else
        goto L_PlaySound2D