Script API - v26.50.24
    Preparing search index...

    Represents a handle to a sound that has been played. The handle is required to control the sound while it is playing (for example, to call stop, setVolume, setPitch, fade, or seekTo). Infinitely-looping sounds (started with loop: -1) stop automatically when the last SoundInstance reference is dropped; retain the handle for as long as the sound should keep playing.

    export class SoundInstance {
    private constructor();
    readonly durationInfo?: SoundDurationInfo;
    readonly id: string;
    readonly recipient?: Player;
    readonly soundEventId: string;
    stop(): void;
    }
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    durationInfo?: SoundDurationInfo

    Gets duration and playback information for this sound.

    This property can't be read in early-execution mode.

    id: string

    Unique identifier of this sound instance.

    This property can't be read in early-execution mode.

    recipient?: Player

    Gets the player this sound was played for.

    This property can't be read in early-execution mode.

    soundEventId: string

    Gets the identifier of the sound event this instance was started with.

    This property can't be read in early-execution mode.

    Methods

    • Returns void

      Stops this sound instance from playing.

      no-restricted-execution - This function can't be called in restricted-execution mode.

      This function can't be called in early-execution mode.