❓ QWAY Studio HelpQWAY · WRIGHT · RIDLEY · RAMS

Events and player messages

Neutral event payload

TypeScript
type StudioEvent = {
  type: string;
  subject: string | null;
  target: string | null;
  time: number; // runtime seconds, finite
};

StudioEventBus supplies subscribe(listener), emit(event), events snapshots, reset and dispose. Unsubscribe using the returned function. History is bounded to 256 events; queue/delivery to 128. Listener failures and reentrant cycles produce diagnostics. This is transient observation, not durable event sourcing or an authoring mutation API.

Produced and accepted events

NameProducer / consumerSubject → target and lifecycle
qway.object.enter / qway.object.leaveHost/QWAY observation → director/experience filtersObject UUID → target UUID/null; explicit observed enter/leave, not synthetic teleport proof
qway.relation.changedHost relation observation → directing filtersObject UUID → related target/null; does not rewrite authored relation
qway.interactionHost interaction → experience/trigger filtersActing object UUID → target/null
qway.triggerProximity/runtime or host → experience/trigger filtersActor UUID → trigger target/null; once policy is explicit
wright.room.enter / wright.room.leaveWorld transition observer → experienceActor UUID → room UUID, derived from resolved feet position after baseline
wright.portal.crossedWorld transition observer → experienceActor UUID → portal UUID; continuous crossing within aperture, not teleport
ridley.complete / ridley.stopCinematic director → experience/hostCinematic completion/stop; adapter emits neutral subject/target and current time
ridley.playCinematic director → experience/hostSequence started; director PlayerEvent also carries cinematic name
ridley.state.enterExperienceDirector → host/subscribersState entry notification; inspect target state in actual payload
ridley.conversation.finishedExperienceDirector → transitionsConversation actor and state context; explicit end releases control
Custom emit eventAuthored RIDLEY emit cue or explicit host → bus filtersOptional target; lower-case bounded event name, not executable code

Commands sent to the player

CinematicDirector subscriptions receive PlayerEvent, which adds cinematic: string|null to the neutral event fields. The experience bridge emits the neutral form; read director state for the active sequence. ridley.state.enter has null subject and target state ID; ridley.conversation.finished has actor subject and null target.

MessagePayloadEffect
ridley.play / ridley.gotocinematic: sequence nameStart/go to an existing compiled cinematic, not seek to arbitrary source text
ridley.pause / ridley.resumetype onlyPause/resume cinematic clock
ridley.stop / qway.interactivetype onlyStop direction / return to interactive ownership
ridley.state.gotostate: compiled state IDExperience state transition; distinct from cinematic goto
qway.object.enter / leave / relation.changed / interaction / triggersubject UUID, target UUID|nullDeliver explicit host observation through the directing bridge

WRIGHT events are emitted through the neutral event bus/experience emit API, not invented PlayerMessage variants. Unknown sequences/states or unavailable playback are errors. User control changes are state policy; there is no general “set any transform” player message.

Host subscription and dispatch

TypeScript
const stopListening = preview.experience.bus.subscribe(event => {
  console.log(event.type, event.subject, event.target, event.time);
});
preview.dispatch({ type: "ridley.play", cinematic: "intro" });
preview.dispatch({ type: "ridley.pause" });
preview.dispatch({ type: "ridley.resume" });
// Teardown:
stopListening();
preview.dispose();

Fragment: await preview.ready and verify preview.experience exists first. The complete downloadable host handles load/errors and lifecycle. Do not inject room-enter events to pretend a blocked actor navigated successfully.