C4 Engine
C4 Engine API Documentation

class ChatMessage

Defined in:  C4Messages.h
The ChatMessage class encapsulates a message that contains a text string.
Definition

class ChatMessage : public ReflectingMessage

Constructor

ChatMessage(const char *text);

Parameters
text A pointer to the text string to be stored in the message object. This string is truncated to the maximum length given by the kMaxChatMessageLength constant.
Description
A message of type ChatMessage is used to send a text message to other players in a game. The ChatMessage object contains both the text message and the player ID of the machine from which it originated. When a chat message is received, the Message Manager calls the Application::HandlePlayerEvent function with the kPlayerChatReceived event to pass the text message to the application module. In this case, the param parameter passed to the HandlePlayerEvent function points to the chat text string.
Base Classes
Message All message types are subclasses of Message.
See Also

Application::HandlePlayerEvent