Sound
Instances a new Sound with certain properties. These properties should be passed through as a normal JavaScript object.
REQUIRED:
source (String) - filename, relative to ChatTriggers assets directory
OPTIONAL:
priority (boolean) - whether this sound should be prioritized, defaults to false
loop (boolean) - whether to loop this sound over and over, defaults to false
stream (boolean) - whether to stream this sound rather than preload it (should be true for large files), defaults to false
CONFIGURABLE (can be set in config object, or changed later, but MAKE SURE THE WORLD HAS LOADED)
category (String) - which category this sound should be a part of, see setCategory.
volume (float) - volume of the sound, see setVolume
pitch (float) - pitch of the sound, see setPitch
x, y, z (float) - location of the sound, see setPosition. Defaults to the players position.
attenuation (int) - fade out model of the sound, see setAttenuation
Parameters
the JavaScript config object
Constructors
Functions
Sets the attenuation (fade out over space) of the song. Models are: NONE(0) - no fade ROLLOFF(1) - this is the default, meant to be somewhat realistic LINEAR(2) - fades out linearly, as the name implies
Sets the category of this sound, making it respect the Player's sound volume sliders. Options are: master, music, record, weather, block, hostile, neutral, player, and ambient
Updates the position of this sound
Sets this sound's volume. Will override the category if called after setCategory, but not if called before.