--- generated_by: gdlink-build generated_at: 2026-06-23T12:34:28Z do_not_edit: true title: Message brick_type: executor tier: Basic generated: true --- # Message **Category:** Executor **Tier:** Basic ## Purpose Sends messages to other objects via the MessageBus system, enabling object-to-object communication and event broadcasting. ## Visual Reference ```{raw} html
As added to your scene
Message brick as it appears in the GDLink editor
``` ## When To Use - Event broadcasting (boss dies -> trigger cutscene) - Combat systems (projectile hits -> deal damage) - UI updates (score changes -> update HUD) - Quest systems (item collected -> check completion) - State synchronization (button pressed -> open door) - Audio cues (footstep -> play sound at location) - Object spawning (enemy dies -> spawn loot) ## Runtime Behavior **Executes**: When activated, broadcasts a message to specified recipients ```{raw} html
Generated UI Mockup — showing expanded properties
Message
-
x
Name:
Label this brick...
Subject:
v
Target:
v
Body Type:
Text
Body/Property:
v
Scope:
Local
``` ## Properties | Property | Type | Default | Notes | |---|---|---|---| | Subject | string | | For Listener: subject to listen for (empty=any). For Executor: subject to send | | Target | string | | [Executor only] Target object name (empty = broadcast to all) | | Body Type | option | Text | [Executor only] Send text message or property value | | Body/Property | string | | [Executor only] Message text or property name to send | | Scope | option | Local | [Executor only] Read property from local or global variables | ## Example Use Cases **Broadcast Boss Death**: ``` Property(HP, Less or Equal, 0) -> AND -> Message(subject=boss_defeated, body="", target=All) // Multiple listeners: // - Music system plays victory theme // - UI shows completion message // - Door unlocks ``` **Deal Damage**: ``` Collision(Player) -> AND -> Message(subject=damage, body=25, target=Player) // Sends damage value to player object ``` **Door Button System**: ``` // Button object: Collision(Player) -> AND -> Message(subject=door1_open, body="", target=Door1) // Door object: Message_Listener(subject=door1_open) -> AND -> Motion(move_up) ``` **Score Update**: ``` Collision(Collectible) -> AND -> Message(subject=score_update, body=100, target=HUD) // Tells HUD to add 100 points ``` **Quest System**: > Sample inspector layout removed for compatibility.