Skip to content

when beta ​

Variable of @v12-engine/engine/ai

ts
when: ((condition: AiCondition) => RuleBuilder) & {
    told: (word: string) => RuleBuilder;
}

A rule: when(condition).do(action), with once(), every(seconds), priority(n), named(id) between. The condition is a function of the brain or plain data (AiCondition). when.told(word) fires once for each time the word is told, taking it, its action given the word's data