Chat System
💬 Simple AES Chat (Focus + Whisper Walkthrough)
Section titled “💬 Simple AES Chat (Focus + Whisper Walkthrough)”This example shows a minimal multiplayer chat using a single AES Event (AES_ChatMessage) plus 5 supporting Blueprints. Core ideas:
- A Whisper hop PlayerController → GameState (server) followed by a multicast.
- A local Focus path so the Player Controller hears HUD‑originated messages before relaying them.
- Re‑generation on each client (fan‑out) so UI stays decoupled from RPC details.
🛍️ Required Assets
Section titled “🛍️ Required Assets”Instead of a squished table, here’s a card grid:
1. AES_ChatMessage Event
Single AES Event carrying User + Message.
- Mark both fields Instance Editable & Expose on Spawn.
- Gives pins on Generate Event.
2. GM_ChatDemo GameMode
Glue class that designates GS_ChatDemo + PC_Chatter. No extra logic.
3. GS_ChatDemo GameState
Owns stable Identity (Object ID = GameState), listens for Whisper chat, multicast → re‑generate locally.
- Registers Whisper for
AES_ChatMessage. - Multicast
MC_ChatMessagefan‑out.
4. PC_Chatter PlayerController
Local input + bridge to server. Focus‑listens for HUD messages (broadcaster ChatHud).
- RPC
SR_SendMessage→ server Whisper to GameState. - Spawns HUD if locally controlled.
5. W_ChatHUD
Text entry + scroll list. Generates local (no target) events; also Focus‑listens to GameState re‑broadcast.
- Identity with
Object ID = ChatHud. - Creates & focuses input; sends on Enter / button.
6. W_ChatMessage
Visual row; fade in → delay → fade out, then remove.
- Sets
User:prefix & message text.
1. 💌 Create the Event: AES_ChatMessage
Section titled “1. 💌 Create the Event: AES_ChatMessage”- Right‑click →
AES→Event→ name itAES_ChatMessage. - Add 2 properties:
User(Name or String) – set Instance Editable + Expose on Spawn.Message(String / Text) – also Instance Editable + Expose on Spawn.

Because the properties are exposed, the Generate Event node will give you pins for User + Message when you pick this Event Class.
2. 🎮 Game Mode: GM_ChatDemo
Section titled “2. 🎮 Game Mode: GM_ChatDemo”Very simple: in the world settings, set Default Game State Class to GS_ChatDemo and Player Controller Class to PC_Chatter. (Any default pawn is fine / irrelevant.)

3. 🧠 Game State: GS_ChatDemo
Section titled “3. 🧠 Game State: GS_ChatDemo”Responsibilities:
- On
Begin Playcall Generate Identity with:
Object= SelfObject ID=GameState(hard-coded label so clients & server agree; there is only one Game State instance).
- Register for Whisper of
AES_ChatMessage(using the Identity you just generated) – this lets the server receive direct chat events targeted at the Game State. - Implement a custom event
MC_ChatMessagemarked Multicast (reliable optional) with params:User(Name) &Message(String/Text). - When
AES_ChatMessageWhisper arrives on server:
- Extract its payload (
User,Message). - Call
MC_ChatMessage(User, Message)so every client (including sender) hears it.
- Inside
MC_ChatMessageon each client:
- Call
Generate Event(no Target Id) with Event =AES_ChatMessage, filling the sameUser+Message. This turns the network replication into a local broadcast path so UI elements (e.g. Focus registrations) can respond uniformly.

4. 🕹️ Player Controller: PC_Chatter
Section titled “4. 🕹️ Player Controller: PC_Chatter”Responsibilities:
- On
Begin Play→ Generate Identity (no Object ID needed, let it be unique per player). - If
Is Local Controller:
- Create and add a
W_ChatHUDto viewport.
- Register for Focus for
AES_ChatMessagewhere Broadcaster ID =ChatHud. (You will generate an Identity in the HUD with that Object ID, making it the broadcaster for local typed messages.) - Custom Event
SR_SendMessage(RunOnServer) with paramsUser+Message.
- On server: Call
Generate EventforAES_ChatMessagewith Target Id = GameState (the Game State’s Identity ID) so it arrives as a Whisper and triggers the server’s registration.
- Local handling of HUD-origin messages: when the Focus registration fires (HUD generated an event without target), call
SR_SendMessageto hop to server.
Flow so far (local player typing):
W_ChatHUD (Generate Event no target) → Focus hit in PC_Chatter → SR_SendMessage → Server → Generate Event (Target Id = GameState) → GS_ChatDemo Whisper → MC_ChatMessage → All clients → each client re‑generates (no target) → their UIs respond.

5. 🗨️ HUD Widget: W_ChatHUD
Section titled “5. 🗨️ HUD Widget: W_ChatHUD”UI Elements (suggested):
ScrollBox(messages container)EditableTextBox(TXT_Message)Button(BTN_Send)
Setup on Construct / Begin Play:
- Generate Identity with
Object ID = ChatHud(important – matches the Focus listener in the Player Controller). - Register for Focus of
AES_ChatMessagewith Broadcaster ID = GameState so it hears messages fanned out after the multicast re‑generation. - Show mouse cursor (via owning Player Controller) & set keyboard focus to the text box.
Sending a message (two entry points):
- On Text Box
OnTextCommitted(OnEnter) – if not empty - On
BTN_Sendclicked – if not empty
Then:
- Grab Player State name (or fallback like “You”).
- Call
Generate Event(Event =AES_ChatMessage) without Target Id and fillUser+Message.
- Player Controller hears it (Focus: broadcaster = ChatHud) and triggers the server path.
- Clear the text box & refocus it.
Receiving messages from Game State:
- Focus registration (broadcaster = GameState) fires when Game State re‑generates after multicast.
- Create a
W_ChatMessagewidget, set itsUser&Message, add to ScrollBox, then scroll to end.

6. 🧾 Message Row: W_ChatMessage
Section titled “6. 🧾 Message Row: W_ChatMessage”On Construct:
- Set
TXT_UsertoUser + ":"(or style as you like) andTXT_Messageto message text. - Play a
FadeInanimation. - Delay (e.g. 10s) then play
FadeOut; on animation finished remove self.

📎 Event & Identity Cheat Sheet
Section titled “📎 Event & Identity Cheat Sheet”| Action | Generate Event Call | Target Id | Who Listens |
|---|---|---|---|
| User types locally | AES_ChatMessage | (none) | Player Controller (Focus: ChatHud) |
| PC → Server | (RPC only) | — | — |
| Server relays to GS | AES_ChatMessage | GameState | Game State (Whisper) |
| Server → clients | (Multicast RPC) | — | All clients run handler |
| Clients re-fan-out | AES_ChatMessage | (none) | Local HUD Focus (GameState) + any other listeners |
🛠️ Troubleshooting
Section titled “🛠️ Troubleshooting”| Symptom | Likely Cause | Fix |
|---|---|---|
| No messages appear anywhere | Game State Identity not generated or wrong Target Id used | Ensure GS sets Object ID = GameState & server PC uses that Identity ID as Target |
| HUD never triggers server | PC not Focus-registered for broadcaster ChatHud | Verify Focus registration broadcaster ID = ChatHud |
| Messages only local, no replication | Forgot SR_SendMessage RPC or Whisper generation step | Ensure PC server RPC runs & generates with Target Id |
| Messages duplicated | Multiple Focus registrations or re‑generation done twice | Check you only re‑generate inside multicast once |
✅ Recap
Section titled “✅ Recap”You built a pipeline that:
- Generates per‑object Identities (HUD, PC, Game State) with intentional Object IDs where needed (
ChatHud,GameState). - Uses Focus (no Target Id generation) for local HUD → Player Controller message origination.
- Uses Whisper (Target Id = GameState) for authoritative server ingestion.
- Multicasts & re‑generates (no target) to create a uniform UI consumption path.
That’s the full loop—concise, network aware, and a clean example of Focus + Whisper interop.