Skip to main content

Voicechat

The voicechat system allows players to communicate with each other using their microphone.

The SDK offers a variety of methods to control the voicechat system, from walkie-talkie style to proximity-based voicechat or a combination of both.

Modes

The voicechat system supports two modes: global and proximity

ModeDescription
globalAll players can hear each other regardless of their distance.
proximityPlayers can only hear each other if they are close enough based on the distance setting.

Channels

By default, all players are in the same voicechat channel 0.

You can enable and disable different channels by using the player.enableChannel and player.disableChannel methods respectively.

Global and Per Player settings

The voicechat system can be controlled globally or per player.

When using a player method, the global setting will be overridden for that player.

If the voicechat is disabled globally using voicechat.setEnabled, you can't enable it for a specific player. To achieve this, you can use the player.voicechat.setMuted or removing the player from all (or specific) channels using player.voicechat.disableChannel.

SettingDescription
voicechat.setEnabledSets the global voicechat status.
voicechat.setModeSets the global voicechat mode.
voicechat.setDistanceSets the global voicechat distance.
player.voicechat.setPlayerToPlayerModeSets the voicechat mode to player to player.
player.voicechat.enableChannelEnables a voicechat channel.
player.voicechat.disableChannelDisables a voicechat channel.
player.voicechat.setMutedSets the player's muted status.
player.voicechat.setDistanceSets the player's voicechat distance.

Server settings

Basic configuration of the voicechat system like the global VoicechatModeType, distance and status can be done in the Communication tab of the Server Settings.

Communication

Mute Players

A player can be muted for all players using the player.voicechat.setMuted method.

At the same time local players can mute other players from the players list by clicking on the speaker icon: