Exports

You can use exports by doing: exports["evo_sound"]:PlayUrl(soundId, url, vol, loop, options)

Client

Playing sounds

Function
Desc
PlayUrl(soundId, url, vol, loop, options)

Plays URL, will be heard everywhere

PlayUrlPos(soundId, url, vol, pos, loop, options, overrides)

Plays URL at location

Playing TTS

Function
Desc
PlayTTS(soundId, text, lang, vol, options)

Plays TTS, will be heard everywhere

PlayTTSPos(soundId, text, lang, vol, pos, options, overrides)

Plays TTS at location

overrides must be nil or a table, it can override distance, isDynamic, isSpatial and isFilterable

{ distance = 10, isDynamic = true, isSpatial = true, isFilterable = true }

Getters

Function
Desc
getLink(soundId)

Returns current sound URL

getPosition(soundId)

Returns current sound position

isLooped(soundId)

Returns true if looped, false otherwise

getInfo(soundId)

Returns full sound object

soundExists(soundId)

Returns true if sound exists, false otherwise

isPlaying(soundId)

Returns true if sound is playing, false otherwise

isPaused(soundId)

Returns true if sound is paused, false otherwise

getDistance(soundId)

Returns current sound distance

getVolume(soundId)

Returns current sound volume

isDynamic(soundId)

Returns true if sound is dynamic, false otherwise

getTimeStamp(soundId)

Returns sound timestamp

getMaxDuration(soundId)

Returns sound max duration

isPlayerInStreamerMode()

Returns true if player is in streamer mode (muted)

getAllAudioInfo()

Returns all sounds object

isPlayerCloseToAnySound()

Returns true if player is close to sound

isSpatial(soundId)

Returns true if sound is spatial

isFilterable(soundId)

Returns true if sound is fitlerable

isAttached(soundId)

Returns true if sound is attached to any entity

getAttachedNetId(soundId)

Returns attached entity netId

getInteriorId(soundId)

Returns sound current interiorId

getAudioType(soundId)

Returns sound current audio type (audio, stream)

Events

All events take soundId as first param and a function as second param

Event
Desc
onPlayStart(soundId, delegate)

Triggered when sound starts. Wont trigger if SkipEvents is set to true Sound object is passed to the delegate function

onPlayEnd(soundId, delegate)

Triggered when sound ends Sound object is passed to the delegate function

onLoading(soundId, delegate)

Triggered when sound is loading Sound object is passed to the delegate function

onPlayPause(soundId, delegate)

Triggered when sound is paused Sound object is passed to the delegate function

onPlayResume(soundId, delegate)

Triggered when sound is resumed Sound object is passed to the delegate function

onPlayStartSilent(soundId, delegate)

Triggered when sound starts Sound object is passed to the delegate function

onPlayError(soundId, delegate)

Triggered when there is an error playing the sound Sound object is passed to the delegate function

onTimestamp(soundId, delegate)

Triggered when sound timestamp is updated Sound object is passed to the delegate function

onSoundSync(soundId, delegate)

Triggered when sync data is retrieved from the UI Sync object is passed to the delegate function. Learn more about sync on Sync System

onInRange(soundId, delegate)

Triggered when sound gets in player range Sound object is passed to the delegate function

Server

Playing Sounds

PlayUrl(source, soundId, url, vol, loop)

Plays URL, will be heard everywhere

PlayUrlPos(source, soundId, url, vol, pos, loop, overrides)

Plays URL at location

Playing TTS

Function
Desc
PlayTTS(source, soundId, text, lang, vol, loop)

Plays TTS, will be heard everywhere

PlayTTSPos(source, soundId, text, lang, vol, pos, loop, overrides)

Plays TTS at location

Setters

Function
Desc
Position(source, soundId, pos)

Change sound position

Distance(source, soundId, distance)

Change sound position

Destroy(source, soundId)

Destroy sound

Pause(source, soundId)

Pause sound

Resume(source, soundId)

Resume sound

setVolume(source, soundId, vol)

Set sound volume

setTimeStamp(source, soundId, time_)

Set sound timestamp

destroyOnFinish(soundId, bool)

Enable/disable sound destruction on finish

Last updated