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, or, for a <Trigger>, each of its targets inside its sphere: the state its entry and exit events report. 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 the player’s 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);