MP_ChatClient API

The primary bridge between your UI and the Server

Attached to the PlayerController, the MP_ChatClient handles all outgoing RPCs and processes incoming data deltas for the UI.

UI Event Dispatchers (Delegates)

OnMessageReceived

Fires when a single new message arrives.

Returns

RoomID (String), NewMsg (FMP_ChatMessage)

OnRoomBatchMessageReceived

Fires for initial room loads/pagination.

Returns

RoomID (String), NewMsg (Array of FMP_ChatMessage)

OnMessageEdited

Fires when an existing message is modified.

Returns

RoomID (String), MessageID (String), EditedMsg (String)

OnMessageDeleted

Fires when a message is removed.

Returns

RoomID (String), MessageID (String)

Server RPCs & Client Utilities

JoinOrCreateChatRoom

Quick access; joins if exists, creates if it doesn't.

Parameters
RoomDesc

Room Configuration Struct

InviteCode

Optional password string

SendMessage

Broadcasts a new message.

Parameters
RoomID

Name of the room

MessageText

Text body

GetChatRoom

Returns the local AMP_ChatRoom object reference.

Parameters
RoomID

Name of the room

Returns

Local AMP_ChatRoom Object Reference