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

readControlled

readControlled(world, controller, trait?): Entity[]

Every entity controller controls on the tick being stepped, in the order each took ControlledTrait. A character holds it from its spawn, and control adds it at an entity’s first control; a destroy of another may change the order. Those holding trait alone where one is named: readControlled(world, player, KartTrait). A new list each call: a system that reads it every tick keeps its own.

Parameter Type
world World
controller Entity
trait? Trait | PredictedTrait<any> | CoreTrait<any>

Entity[]