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

openKey

openKey(authority, handle, openKeyOptions?): void

Asks the room to hold the key handle names: KeyOpenedEvent answers on a later tick with the key’s entity, its record restored onto it and what its restore spawned, or KeyRefusedEvent with why. With ask, a room that holds it is asked to pass it. A key this room holds or is opening is refused; one it is closing opens again once its close commits. Throws on a world no room holds keys for.

Parameter Type
authority Authority
handle KeyedSaveHandle
openKeyOptions OpenKeyOptions

void

openKey(step, plots.for(worldId, "ada"), { ask: true });