Skip to content

UTChat Cross Module syntax

Alec Sears edited this page Jan 23, 2014 · 1 revision

External Module

On Client


Fire the event "PrintChat" with the following table:

#!lua
args = {
	text*  = string
	color* = Color
	duration = number (default 0 sec., indefinite)
	alpha = number (default 255)
	player = nil (only used by server function)
}

*** = Required**

Notice: The color parameter will not be required in the next release

This will be processed by UTChat into a chat message and displayed to all clients.

On Server


Fire the event "UTLClientEvent" with a table constructed like this:

#!lua

event = {
	name = "PrintChat"
	args = {} (Same as the args table for PrintChat above)
}

Strict table structure - All fields required

You may also specify player in event.args to send to only one player. This is implemented to accommodate the stock function Player.SendChatMessage.

Extended support soon

In a future release, building rich UText objects from external modules will be supported.

Clone this wiki locally