SChatMessage
ClientTypes
Members 4
| Property | SenderID | ID of the sender of the message |
| Property | Sender | Name of the sender of the message |
| Property | Channel | Name of the channel |
| Property | Message | The contents of the chat message |
Properties
SenderIDRead only
uint SenderID {get; }
ID of the sender of the message
Example
Lua
function oc(chatm)
Space.Log(chatm.SenderID)
end
Space.Network.Chat.OnChat(oc)
Lua
--this script processes every new chat message and makes a UIText display the Sender's ID
uiText = Space.Host.GetReference("text").UIText --Add this Text object as reference in Scripting Runtime
OnChatFunction = function(SChatMessage)
uiText.Text = SChatMessage.SenderID
end
Space.Network.Chat.OnChat(OnChatFunction)
SenderRead only
string Sender {get; }
Name of the sender of the message
Example
Lua
function oc(chatm)
Space.Log(chatm.Sender)
end
Space.Network.Chat.OnChat(oc)
Lua
--this script processes every new chat message and makes a UIText display the Sender name
uiText = Space.Host.GetReference("text").UIText --Add this Text object as reference in Scripting Runtime
OnChatFunction = function(SChatMessage)
uiText.Text = SChatMessage.Sender
end
Space.Network.Chat.OnChat(OnChatFunction)
ChannelRead only
string Channel {get; }
Name of the channel
Example
Lua
function oc(chatm)
Space.Log(chatm.Channel)
end
Space.Network.Chat.OnChat(oc)
Lua
--this script processes every new chat message and makes a UIText display the channel's name
uiText = Space.Host.GetReference("text").UIText --Add this Text object as reference in Scripting Runtime
OnChatFunction = function(SChatMessage)
uiText.Text = SChatMessage.Channel
end
Space.Network.Chat.OnChat(OnChatFunction)
MessageRead only
string Message {get; }
The contents of the chat message
Example
Lua
function oc(chatm)
Space.Log(chatm.Message)
end
Space.Network.Chat.OnChat(oc)
Lua
--this script processes every new chat message and makes a UIText display the Message
uiText = Space.Host.GetReference("text").UIText --Add this Text object as reference in Scripting Runtime
OnChatFunction = function(SChatMessage)
uiText.Text = SChatMessage.Message
end
Space.Network.Chat.OnChat(OnChatFunction)



