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

readTriggerOccupants

readTriggerOccupants(world, trigger): readonly Entity[]

Each entity inside trigger now, by any of its colliders: the state its entry and exit events report, so a reader that missed an event, past the event log’s bound or added after the entry, finds who is inside. Answered where the trigger is simulated: on a page, a trigger the room streams throws in development, pointing to isTouching for her own character, and reads empty deployed. The list is refilled by the next call: copy it to keep it.

Parameter Type
world World
trigger Entity

readonly Entity[]

for (const inside of readTriggerOccupants(world, goal)) score(inside);