Function CreateSoundFilenameWithLabel

  • Creates a sound but applies default settings to the sound, which are found under the label from the following SLK-files:

    • UI\SoundInfo\AbilitySounds.slk
    • UI\SoundInfo\AmbienceSounds.slk
    • UI\SoundInfo\AnimSounds.slk
    • UI\SoundInfo\DialogSounds.slk
    • UI\SoundInfo\UISounds.slk
    • UI\SoundInfo\UnitAckSounds.slk
    • UI\SoundInfo\UnitCombatSounds.slk

    Parameters

    • fileName: string

      The path to the file.

    • looping: boolean

      Looping sounds will restart once the sound duration has finished.

    • is3D: boolean

      3D Sounds can be played on particular areas of the map. They are at their loudest when the camera is close to the sound's coordinates.

    • stopwhenoutofrange: boolean
    • fadeInRate: number

      How quickly the sound fades in. The higher the number, the faster the sound fades in. Maximum number is 127.

    • fadeOutRate: number

      How quickly the sound fades out. The higher the number, the faster the sound fades out. Maximum number is 127.

    • SLKEntryName: string

      the label out of one of the SLK-files, whose settings should be used, e.g. values like volume, pitch, pitch variance, priority, channel, min distance, max distance, distance cutoff or eax.

    Returns HandleHolder<"sound">

    Note

    You can only play the same sound handle once.

    Note

    You can only play the same sound filepath four times.

    Note

    Sounds of the same filepath (on different sound handles) must have a delay of at least 0.1 seconds inbetween them to be played. You can overcome this by starting one earlier and then using SetSoundPosition.

    Note

    You can only play 16 sounds in general.

Generated using TypeDoc