Behaviour · function

buildBehaviorTree

Flatten a spec, resolving every name against the tables.

Explained in Agents and behaviour.

function buildBehaviorTree(root: BehaviorSpec, tasks: BehaviorTasks): BehaviorTree
import { buildBehaviorTree } from '@driftengine/core';

Parameters

ParameterTypeDescription
rootBehaviorSpec
tasksBehaviorTasks

In depth

A name with no function is refused here rather than at the moment the agent needs it. A tree is authored once and run for hours; a typo that surfaces the first time a villager reaches the market is a typo that surfaces in front of somebody playing.