package Sound import NoWurst /** Sets the sound duration in milliseconds */ public function sound.setDuration(int dur) SetSoundDuration(this, dur) public function sound.play() StartSound(this) public function sound.stop(boolean killWhenDone, boolean fadeOut) StopSound(this, killWhenDone, fadeOut) public function sound.setChannel(int channel) SetSoundChannel(this, channel) public function sound.setPitch(real pitch) SetSoundPitch(this, pitch) /** Sets the sound's volume [0-100] */ public function sound.setVolume(int volume) SetSoundVolume(this, volume) public function sound.setConeAngles(real inside, real outside, int outsideVolume) SetSoundConeAngles(this, inside, outside, outsideVolume) public function sound.setCutoff(real cutoff) SetSoundDistanceCutoff(this, cutoff) /** Plays the sound, starting at the given position */ public function sound.playPosition(int millisecs) this.play() SetSoundPlayPosition(this, millisecs) /** Returns sound length in milliseconds. Beware that sound lengths of game assets may differ between different locales, and thus return a different duration. If you use a async duration in a synced manner, it will cause a desync. */ public function sound.getDuration() returns int return GetSoundDuration(this) public function sound.isPlaying() returns boolean return GetSoundIsPlaying(this) public function sound.triggerWaitForSound(real offset) TriggerWaitForSound(this, offset) public function sound.setSoundParamsFromLabel(string soundLabel) SetSoundParamsFromLabel(this, soundLabel) public function sound.setSoundDistances(real minDist, real maxDist) SetSoundDistances(this, minDist, maxDist) public function sound.setSoundConeOrientation(real x, real y, real z) SetSoundConeOrientation(this, x, y, z) public function sound.setSoundPosition(real x, real y, real z) SetSoundPosition(this, x, y, z) public function sound.setSoundVelocity(real x, real y, real z) SetSoundVelocity(this, x, y, z) public function sound.attachSoundToUnit(unit whichUnit) AttachSoundToUnit(this, whichUnit) public function sound.startSoundEx(boolean fadeIn) StartSoundEx(this, fadeIn) public function sound.registerStackedSound(boolean byPosition, real rectwidth, real rectheight) RegisterStackedSound(this, byPosition, rectwidth, rectheight) public function sound.unregisterStackedSound(boolean byPosition, real rectwidth, real rectheight) UnregisterStackedSound(this, byPosition, rectwidth, rectheight) public function sound.setSoundFacialAnimationLabel(string animationLabel) returns boolean return SetSoundFacialAnimationLabel(this, animationLabel) public function sound.setSoundFacialAnimationGroupLabel(string groupLabel) returns boolean return SetSoundFacialAnimationGroupLabel(this, groupLabel) public function sound.setSoundFacialAnimationSetFilepath(string animationSetFilepath) returns boolean return SetSoundFacialAnimationSetFilepath(this, animationSetFilepath) public function sound.setDialogueSpeakerNameKey(string speakerName) returns boolean return SetDialogueSpeakerNameKey(this, speakerName) public function sound.setDialogueTextKey(string dialogueText) returns boolean return SetDialogueTextKey(this, dialogueText)