AudioSound¶
Extends EngineObject.
A sound file loaded by AudioSystem.LoadSound: play it any number of times, on any bus.
Properties¶
path: stringRead-only.is3_d: booleanRead-only.min_distance: numberThe distance in meters up to which the sound is not made quieter (inverse-distance rolloff starts here): 1. Voices of this sound start with it.max_distance: numberThe distance in meters beyond which the sound gets no quieter: 10000. Voices of this sound start with it.length: numberThe length in seconds (0 when the file does not say). Read-only.
Methods¶
play¶
function play(self, bus: string?, volume: number?, pitch: number?, loop: boolean?, entity: Entity?): AudioVoice
Plays it on bus (see AudioSystem.GetBus; empty is the master mix), at this volume and pitch, looping if asked (or if it was loaded with loop), following entity if given. Returns the voice.