Table of Contents

Class Intercom

Namespace
Exiled.API.Features
Assembly
Exiled.API.dll

A set of tools to easily handle the Intercom.

public static class Intercom
Inheritance
Intercom
Inherited Members

Properties

DisplayText

Gets or sets the text displayed on the intercom screen.

public static string DisplayText { get; set; }

Property Value

string

GameObject

Gets the intercom's UnityEngine.GameObject.

public static GameObject GameObject { get; }

Property Value

GameObject

InUse

Gets a value indicating whether the intercom is currently being used.

public static bool InUse { get; }

Property Value

bool

IntercomDisplay

Gets the instance of PlayerRoles.Voice.IntercomDisplay.

public static IntercomDisplay IntercomDisplay { get; }

Property Value

IntercomDisplay

RemainingCooldown

Gets or sets the remaining cooldown of the intercom.

public static double RemainingCooldown { get; set; }

Property Value

double

Speaker

Gets the Player that is using the intercom.

public static Player Speaker { get; }

Property Value

Player

Remarks

Will be null if InUse is false.

SpeechRemainingTime

Gets or sets the remaining speech time of the intercom.

public static float SpeechRemainingTime { get; set; }

Property Value

float

State

Gets or sets the current state of the intercom.

public static IntercomState State { get; set; }

Property Value

IntercomState

Transform

Gets the intercom's UnityEngine.Transform.

public static Transform Transform { get; }

Property Value

Transform

Methods

HasOverride(Player)

Checks whether the player is currently overriding the intercom to speak globally.

public static bool HasOverride(Player player)

Parameters

player Player

The Player to check for a global intercom override.

Returns

bool

true if the player has global intercom override; otherwise, false.

PlaySound(bool)

Plays the intercom's sound.

public static void PlaySound(bool isStarting)

Parameters

isStarting bool

Sets a value indicating whether the sound is the intercom's start speaking sound.

Reset()

Reset the intercom's cooldown.

public static void Reset()

Timeout()

Times out the intercom.

public static void Timeout()

TrySetOverride(Player, bool)

Modifies whether the player is overriding the intercom to speak globally.

public static bool TrySetOverride(Player player, bool newState)

Parameters

player Player

The Player whose intercom override state will be changed.

newState bool

Indicates whether the player should be given the global intercom override.

Returns

bool

true if the player was successfully added or removed from the override list; otherwise, false.