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

readEvents

readEvents<Record, Delivery, Scope>(step, event, options?): ReadEventsResult<EventHandle<Record, Delivery, Scope>>

Every event of event emitted since this system’s previous run started, oldest first, so a system reads each event once whether it runs before or after the emitter: one before reads it in the next step. Never this run’s own emits, which it reads next run, and the same list however many times it reads in one run. A predicted system reads none, which the step’s type holds: a replay would read them again. The array is valid until the system returns.

Type Parameter
Record
Delivery extends Reliable | Cosmetic | ServerOnly
Scope extends EventScope
Parameter Type
step UnpredictedStep
event EventHandle<Record, Delivery, Scope>
options? ReadEventOptions

ReadEventsResult<EventHandle<Record, Delivery, Scope>>