Description
Supported Script Types:
- Interface Scripts
- Client Entity Scripts
- Avatar Scripts
Chat
API lets you use chat in world.Methods
Name | Return Value | Summary |
---|---|---|
addCommand
|
ChatCommand |
Adds a command to chat. |
getCommand
|
ChatCommand |
Get one command for chat. |
getCommands
|
Array.<ChatCommand> |
Get all commands for chat. |
removeCommand
|
None |
Removes a command from chat. |
sendMessage
|
None |
Sends the given message to all other users in world. |
showMessage
|
None |
Shows the given message locally. |
Signals
Name | Summary |
---|---|
messageReceived
|
Triggered when a chat message is received. |
messageSent
|
Triggered when the user sends a message. |
Method Details
(static) addCommand( command, description ) → {ChatCommand}
Returns: The command added. |
|||||||||
---|---|---|---|---|---|---|---|---|---|
Adds a command to chat. Parameters
ExampleAdd new `/scale 0.5` command
|
(static) getCommand( command ) → {ChatCommand}
Returns: The command. |
||||||
---|---|---|---|---|---|---|
Get one command for chat. Parameters
|
(static) getCommands( ) → {Array.<ChatCommand>}
Returns: All available commands. |
---|
Get all commands for chat. |
(static) removeCommand( command ) | ||||||
---|---|---|---|---|---|---|
Removes a command from chat. Parameters
|
(static) sendMessage( message, meopt, ttsopt ) | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Sends the given message to all other users in world. Parameters
|
(static) showMessage( message ) | ||||||
---|---|---|---|---|---|---|
Shows the given message locally. Parameters
|
Signal Details
messageReceived(
data,
senderID
)
Returns: Signal |
|||||||||
---|---|---|---|---|---|---|---|---|---|
Triggered when a chat message is received. Parameters
Example
|
messageSent(
message
)
Returns: Signal |
||||||
---|---|---|---|---|---|---|
Triggered when the user sends a message. Parameters
Example
|