Examples

Sandbox

The simplest Intent Forge agent that makes an actual decision. Two actions, one sensor, drop-in C++ actor.

[ Example ]

Sandbox — hunger loop

The simplest Intent Forge agent that makes a decision. The planner picks between Cook (when food isn't ready) and Eat (when both hungry and food is ready). Reach for this right after the Quickstart when you want the full pipeline running without authoring any assets. The actor builds its archetype in memory at BeginPlay.

DIFFICULTY ▮▯▯ BEGINNERSHIPS AS DROP-IN C++ ACTORBUILD ~2 MIN

Anatomy

◢ Spec

Anatomy

One goal, two actions, one sensor. The minimum loop with a real decision.

Goal — BeNotHungryIntentGoal
Desired State
Hungry == false
Priority
1.0
Action — CookIntentAction
Effects
FoodReady = true
Executor
Wait (2s)
Action — EatIntentAction
Preconditions
FoodReady && Hungry
Effects
FoodReady=false, Hungry=false
Executor
Wait (1s)
Sensor — HungerTimerInternal sensor
Effect
Hungry = true every HungerInterval (default 6s)

The planner picks Cook when food isn't ready and Eat when both preconditions hold. With the default intervals it cycles forever: hungry → cook → eat → satisfied → wait → hungry.

How to use it

Drop an Intent Forge Sandbox Actor in any level.
(Optional) Tune Hunger Interval, Cook Seconds, Eat Seconds in the Details panel.
Hit Play. Open Window → Developer Tools → IntentForge Live Inspector. The agent appears in the list with its current plan + world state.

On-screen debug messages narrate transitions if Show On Screen Messages is on (default true).

◢ T+

Expected behaviour

  1. 0 → 6sIdle

    Plan empty. No needs pressing.

  2. 6sHungry flips true

    Planner picks Cook — its effect satisfies the precondition for Eat.

  3. 6 → 8sCook runs

    Wait executor for 2s. FoodReady becomes true.

  4. 8sPlanner picks Eat

    Both preconditions now hold.

  5. 8 → 9sEat runs

    1s Wait. Both Hungry and FoodReady reset to false.

  6. 9 → 15sIdle again

    Loop repeats when HungerTimer fires.

Where to find the source

FilePath
HeaderIntentForgeExamples/Public/Sandbox/AIntentForgeSandboxActor.h
ImplementationIntentForgeExamples/Private/Sandbox/AIntentForgeSandboxActor.cpp

Both are heavily commented and built to be read end-to-end as a self-contained Intent Forge tutorial.

◢ Next

Try this next

On this page