Skip to content

Behaviour

Defined in: packages/engine/src/gameplay/entity/behaviour.ts:17

A behaviour’s trait and where its system runs once a server exists. Every behaviour runs on the client until the server package ships, so the declaration is documentation today and routing then.

Type Parameter Default type
T extends Trait Trait
Property Type Description
description? string One line on what it does, which the inspector shows under its name.
ranges? Partial<Record<keyof TraitRecord<T>, PropRange>> A slider’s bounds, by number prop; a prop left out has no slider.
runsOn? RunContext Client unless declared: an undeclared behaviour is never trusted with a consequence.
source? string The file that declares it, for a game’s own behaviour; the engine’s are documented by their wiki page instead.
trait T -
wiki? string The wiki route that documents it, which describe() hands an agent.