PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience

Lua Chat System — Client API — ChatCustomState

Lua Chat System — Client API — ChatCustomState

Oct 31 2018, 12:11 AM PST 5 min

< Return to Lua Chat System

The ChatCustomState is an interface of callbacks used when creating a custom chat state in the chat bar.

Whisper chat and team chat use ChatCustomState to indicate to the player where their message will be sent.

Callbacks

TextUpdated

  • Parameters: None
  • Description: Called when the text in the chat bar is updated.
  • Returns: void

GetMessage

  • Parameters: None
  • Description: Called in order to retrieve the text of the message as it would be written as a single command. This is used in the case that the server needs to process the command as text, rather than the visualized state of the command.
  • Returns: string

ProcessCompletedMessage

  • Parameters: None
  • Description: Called when the player submits the message that is being processed by the custom state. This should return true if the message should not be displayed or sent to the server.
  • Returns: bool

Destroy

  • Parameters: None
  • Description: Called as the ChatBar is being reset back to its original state prior to the custom state modification.
  • Returns: void