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.
Anatomy
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
Hunger Interval, Cook Seconds, Eat Seconds in the Details panel.On-screen debug messages narrate transitions if Show On Screen Messages is on (default true).
Expected behaviour
0 → 6sIdlePlan empty. No needs pressing.
6sHungry flips truePlanner picks Cook — its effect satisfies the precondition for Eat.
6 → 8sCook runsWait executor for 2s.
FoodReadybecomes true.8sPlanner picks EatBoth preconditions now hold.
8 → 9sEat runs1s Wait. Both
HungryandFoodReadyreset to false.9 → 15sIdle againLoop repeats when HungerTimer fires.
Where to find the source
| File | Path |
|---|---|
| Header | IntentForgeExamples/Public/Sandbox/AIntentForgeSandboxActor.h |
| Implementation | IntentForgeExamples/Private/Sandbox/AIntentForgeSandboxActor.cpp |
Both are heavily commented and built to be read end-to-end as a self-contained Intent Forge tutorial.
Try this next
Hello world
The smallest possible Intent Forge agent — one goal, one action, one fact. The entire authoring surface in 20 lines. Use this to verify your install and feel the model click.
Patrol / Chase
Two goals, four anti-flap configurations. Watch flap appear and disappear with each toggle. Drop-in C++ actor.