Skip to content

MessageScope

namespace Griff.Scenes;
public sealed class MessageScope : Component

Keeps the messages this entity and everything inside it send to part of the scene instead of everyone: a board’s Score, a switch’s On Message, a goal’s Covered. With two match boards side by side, each with a scope, each board’s score counter (inside it) hears only its own board. Counters, triggers, sound players, panels and scripts listening with On outside the scope don’t hear them; a script listening with no entity of its own hears only messages sent to everyone.

This is a component: its saved properties are on its component page.

public string? Target { get; set; }

The entity they go to, by name (one inside this one first). Empty is this entity.

public MessageAudience To { get; set; }

Who hears them: everyone, only the Target, or the target and everything inside it.