Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

WhenTest

WhenTest = (entity, world) => boolean

A test a when rule runs each step on an entity whose machine is in its state: the entity, the world’s own for the world’s machine, and the world. It reads the traits and returns whether to move.

Parameter Type
entity Entity
world World

boolean