replicateEvent beta
Function of @v12-engine/engine
ts
export declare function replicateEvent<T, A extends keyof SessionEvents>(event: EventKey<T>, as: A, tell: (payload: T, view: SessionView) => SessionEventOf<A> | undefined): ReplicatedEvent;How an event of the world is told to a player, written beside what emits it: replicateEvent(healed, 'heal', (heal, view) = view.knows(heal.target) ? type: 'heal', ... : undefined). Listed by the engine for its own, by a pack in GamePack.replications