Skip to main content

Using the Gameplay Messaging System Plugin

The Gameplay Messaging System plugin provides a lightweight, flexible, and decoupled way to send and receive events across actors, components, and systems in Unreal Engine. It is ideal for gameplay logic that requires communication between loosely coupled objects, such as triggering doors, updating UI, or broadcasting game events.

The plugin is easy to use and fully supports Blueprints and C++.


Key Features

  • Event-Based Communication: Trigger and listen for named events with optional payload data.
  • Decoupled Design: Actors don’t need direct references to communicate.
  • Blueprint & C++ Support: Fully accessible in both visual scripting and code.
  • Lightweight & Performant: Minimal overhead, suitable for frequent use.

Usage Examples

Explore these practical examples to get started:


Triggering and Binding Events

1. Trigger a Simple Event

Send a named event (e.g., "Door.Open") to all listeners.

Triggering a Simple Event

Steps:

  1. Use the Trigger Message node.
  2. Set the Message Name to "Door.Open".
  3. Execute to broadcast the event.

2. Trigger an Event with Payload

Send an event with additional data, such as the Character that triggered it.

Triggering Event with Character Payload

Steps:

  1. Use the Trigger Message node.
  2. Set Message Name to "Door.OpenedByPlayer".
  3. Add a payload parameter (e.g., Instigator of type ACharacter*).
  4. Connect the triggering character to the payload input.

Binding to Events

To receive messages, use the Bind to Message node in any actor or widget:

Bind to Message → Message Name: "Door.Open" → On Received → Open Door Animation

You can bind in:

  • Actors (e.g., doors, triggers)
  • Widgets (e.g., update health UI)
  • Game Mode / Game Instance (e.g., global events)

Best Practices

  • Use descriptive message names (e.g., "Player.Died", "Item.PickedUp").
  • Include payloads for context when needed (e.g., who triggered the event).
  • Unbind listeners in EndPlay to prevent memory leaks.
  • Use namespaces in message names (e.g., "Door.Open", "Door.Close") to avoid conflicts.

Example Project

Download the full Example Project to see the messaging system in action with doors, UI updates, and more.