SP8_ChatComponent {{ currentPage ? currentPage.title : "" }}

This Component needs to be added to the Player Actor.

Settings

Message

Option

Description

Max Message Length

Max Characters inside a Message.

Log

Option

Description

Default Log Color

On ReceiveLog() if the Type or SubType Color could not be found, which Color should be shown?

Log Colors by Type

Changes the Color of the Log by the Type of the Log.

Log Colors by Sub Type

Changes the Color of the Log by the SubType of the Log.

Overwrites the Log Colors by Type!

Plugin Logs

Customize Logs

Example:

Key: Select LogType

Type: Can be left empty if not needed

SubType: Can be left empty if not needed (Sometimes it will be overwritten with different Values)

Message: What should be printed to the Chat Box.

OnlyOnDebug: Display's the Log only if you enabled Debugging inside the Chat Component

Debug

If set to true, every Log of the Chat Component will be shown in the Chat.

Command

Option

Description

Command Prefix

On SendMessage() the Component will check if the Message starts with that Prefix.

If yes, it will be checked, if it’s a valid Command.

Example: /blue <Text> // If the Prefix is /, blue will be registered as Command.

Commands

Create new Commands.

Example:

Key: How to call it (Do not add the Prefix)

Replication: Will the Command Entered Function be called on Server or Client?

usableByEveryone: If set to false, the Function “CanSendMessage” will be called

Moderation

Option

Description

Mute Minutes by Warn Count

Set how long the Player will be muted, after warnings.

Key: Warn Count (0, will not mute)

Value: Mute Minutes

All Minutes will be calculated together.

For example, if you call Warn and the AddingWarnCount Input is 3 and the current Warn Count is 1, the Values of the Key’s 1, 2 and 3 will be calculated together, which will be the Muted Minutes.

Warn Count Interval

In what Interval (Minutes) the Warn Count will be reduced by 1.

Widget

Option

Description

Widget Class

Set the Widgets, which should be spawned.

Leave empty, if you want to use your own Widgets.

Key: String, where you can access the Widget, if you call getWidget

Value: Widget Class

Save Load

Option

Description

Save Moderation

Save how many Minutes the Player is muted and how many Warn Counts he has.

Save Listening Channels

Save which Channels the Player is listening. Only needed if you have Channels, which are not accessable by all Players.

Save Private Messages

Save all private Messages, which he wrote or received.

Functions

Message

Function

Callable

Description

Default Use-Case

SendMessage

Server & Client

Send a Message to other Player.

You have the option between three different types:

- Normal Message: Send a Message into a Channel

- Global Message: Send a Message to everyone

- Private Message: Send a Message to one Person.

Should be called, when the Player wrote something into the TextBox of the Chat and commited it.

ReceiveMessage

Server & Client

If a Message is arriving to the Player, this Function will be called (Only visible to the Owner).

Usually not beeing used, because it will be used after calling SendMessage by all Players, who are allowed to see the Message.

get Private Messages

Server & Client

Get all Private Messages

If you have a Private Message Window and if the Player starts Playing, to load all Messages.

delete Private Message

Server

Delete a Private Message from all Private Messages catched by the Component.

If you want to remove a Message from the List.

Log

Function

Callable

Description

Default Use-Case

ReceiveLog

Server & Client

Prints a Log to the Chat (Only visible to the Owner)

If a Message should be visible to send to the Player (For example if he gains XP).

Channel

Function

Callable

Description

Default Use-Case

getAvailableChannels

Server & Client

Returns all viewable Channels

Inside the Chat Widget to get, which Channels should be visible.

SetCooldown

Server

Starts a Cooldown for the Player for a certain Channel.

If you call that Function and the Interval is higher then 0, the Player will not be able to write, until the Cooldown will be back at 0.

Interval is in Seconds.

Could be used for custom Cooldowns, but not needed to be called.

ListenToChannel

Server

Let the Player listen to a Channel.

You do not need a Listener for Channels, which is visible to everyone!

Could add a Listener for a Group Channel.

On Create Group you need to call Add Channel on GameState Chat Component and after that, every Member could add a Listener to this Channel.

StopListenToChannel

Server

Stop listening to a Channel.

Could remove a Listener if a Group gets deleted.

Moderation

Function

Callable

Description

Default Use-Case

Warn

Server

Warn the own Player, if he did something wrong.

WarnOtherPlayer

Server & Client

Warn another Player, if he did something wrong.

Make a Chat Command for example like this:

/warn <Player> <Reason>

GetWarnCount

Server & Client

Get the current Warn Count

Mute

Server

Mute the own Player for x Minutes.

If Minutes are lower then 1, the Player will be unmuted.

MuteOtherPlayer

Server & Client

Mute another Player for x Minutes.

If Minutes are lower then 1, the Player will be unmuted.

Could be called inside a Admin Panel or as a Chat Command.

CheckIfMuted

Server & Client

Returnes if the Player is Muted and how long in Minutes.

Widget

Function

Callable

Description

Default Use-Case

getWidget

Client

Get the Widget by the Key, defined in the Details Panel at “Widget Class”.

Used to access the Widget.

Save Load

Function

Callable

Description

Default Use-Case

Save

Server

Save all variables based on the Settings.

Should be called, if the Player is going offline.

Alternative every x Minutes.

Load

Server

Load all variables.

Should be called on start.

Initialize

Server

Set the saved variables.

Only used, if you use your own Save/Load System.

Dispatcher

Message

Dispatcher

Called

Description

Default Use-Case

MessageReceived

Client

Contains following Infos:

- Name: Name of the Player

- Name Color

- Message Color

- Time

- Message Info

Message Info contains:

- Message Type (Normal, Global or Private)

- Message

- Normal Message Input

- Private Message Input

Normal Message Input contains:

- Channel

Private Message Input contains:

- Name: Name of the receiving Player

Should be used to get all new Messages to print those inside the Chat Widget.

showMessageOverHead

Server

Contains following Infos:

- MessageInfo

- ColorInfo

- Time

Message Info contains:

- Message Type (Normal, Global or Private)

- Message

- Normal Message Input

- Private Message Input

ColorInfo contains:

- UseCustomNameColor

- UseCustomMessageColor

- NameColor

- MessageColor

Set a Widget over the Head of the Player and set the Text and if needed the Color.

Log

Dispatcher

Called

Description

Default Use-Case

LogReceived

Client

Contains following Infos:

- Type

- SubType

- Message

- Color

Could be used to print the Log to the Chat Widget.

Channel

Dispatcher

Called

Description

Default Use-Case

ChannelChanged

Server & Client

Available Channels have changed.

Contains following Infos:

- Channels

Bind it if you want to hide unavailable Channels or make them visible.

Save Load

Dispatcher

Called

Description

Default Use-Case

Initialized

Server

Fires after you called the Function Load or Initialize.

{{{ content }}}