Set
These are setters
Set TimeStamp
exports['mx-surround']:setTimeStamp(source, soundId, timeStamp)Parameters
source:
numbersoundId:
stringtimeStamp:
number
Set Volume
exports['mx-surround']:setVolumeMax(source, soundId, volume, disableOverWrite)Parameters
source:
numbersoundId:
stringvolume:
numberdisableOverWrite?:
booleanIf true, volume will not be overwritten by sound profile
Set Type
Parameters
source:
numbersoundId:
stringstereo:
booleanIf this is false, it will be spatial (3D)
Set Panner
Parameters
source:
numbersoundId:
stringpanner:
PannerNode
Set Coords
Parameters
source:
numbersoundId:
stringcoords:
vector3xSound?:
boolean
Set TimeStamp
Parameters
source:
numbersoundId:
stringcoords:
number
Set Loop
Parameters
source:
numbersoundId:
stringloop:
boolean
Set Max Distance
Parameters
source:
numbersoundId:
stringmaxDistance:
number
Set Destroy On Finish
Parameters
source:
numbersoundId:
stringdestroyOnFinish:
number
Set Emitters
Parameters
source:
number—-1for everyonesoundId:
string | numberemitters:
vector3[]— up to 8 positions
Returns
true | false
Set Fills Space
Parameters
source:
number—-1for everyonesoundId:
string | numberoptions:
table | false— same shape as the client export
Returns
true | false
Set Leak Distance
Parameters
source:
number—-1for everyonesoundId:
string | numberoptions:
table | false—{ min, max, maxLeakage }
Returns
true | false
Set Rolloff
Parameters
source:
number—-1for everyonesoundId:
string | numberscale:
numberplateau?:
number
Returns
true | false
Set Playback Rate
Play a sound faster or slower for one player, or for everyone with -1.
With -1 the rate is saved on the server: players who join or walk into range later start at the same speed. The server's own clock also runs at that rate, so getTimeStamp, the join seek and the end-of-track timing all stay in media time. This works for sounds placed with the creator too, and the rate carries over to the next track in the playlist.
Parameters
source:
number-1for everyone
soundId:
string | numberrate:
number1.0is normal speed. Clamped to0.25-4.0YouTube links snap to YouTube's own speeds:
0.25,0.5,0.75,1.0,1.25,1.5,1.75,2.0
preservePitch?:
booleantruekeeps the key,falselets the pitch follow the speed. Defaulttrue
Returns
number | falseThe rate actually applied
Last updated