|
|
Line 1: |
Line 1: |
− | =Properties=
| + | This page has moved to: https://docs.sine.space/v/scripting/client-scripting/components/svoicezone |
− | | + | |
− | {{ScriptFunction|bool|Enabled|{get; set;}|Whether the Voice Zone component is Enabled or not|5=
| + | |
− | local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone<br>
| + | |
− | Space.Log(voiceZone.Enabled) |6=<pre>--clicking this object will Enable/Disable it's Voice Zone component
| + | |
− | thisGameObject = Space.Host.ExecutingObject
| + | |
− | component = thisGameObject.VoiceZone
| + | |
− | | + | |
− | OnClick = function()
| + | |
− | component.Enabled = not component.Enabled
| + | |
− | end
| + | |
− | | + | |
− | | + | |
− | thisGameObject.AddClickable()
| + | |
− | thisGameObject.Clickable.OnClick(OnClick)</pre>
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|bool|AllowVoice|{get; set;}|Whether allows voice.|5=
| + | |
− | local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone<br>
| + | |
− | Space.Log(voiceZone.AllowVoice)
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|bool|AllowVideo|{get; set;}|Whether allows video.|5=
| + | |
− | local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone<br>
| + | |
− | Space.Log(voiceZone.AllowVideo)
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|int|Priority|{get;}|The priority of the voice zone|5=
| + | |
− | local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone<br>
| + | |
− | Space.Log(voiceZone.Priority)
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|string|AreaName|{get;}|The name of area.|5=
| + | |
− | local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone<br>
| + | |
− | Space.Log(voiceZone.AreaName)
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|bool|Spatialized|{get;}|Whether the voice zone is spatialized.|5=
| + | |
− | local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone<br>
| + | |
− | Space.Log(voiceZone.Spatialized)
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|bool|SpatialDropoff|{get;}|Whether the voice zone is spatialized drop off.|5=
| + | |
− | local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone<br>
| + | |
− | Space.Log(voiceZone.SpatialDropoff)
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|bool|SpatialStereo|{get;}|Whether the voice zone is spatial stereo.|5=
| + | |
− | local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone<br>
| + | |
− | Space.Log(voiceZone.SpatialStereo)
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|float|SpatialDistance|{get;}|The spatial distance of the voice zone.|5=
| + | |
− | local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone<br>
| + | |
− | Space.Log(voiceZone.SpatialDistance)
| + | |
− | }}
| + | |
− | | + | |
− | | + | |
− | {{ScriptFunction|bool|Global|{get;}|Whether the voice zone is global.|5=
| + | |
− | local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone<br>
| + | |
− | Space.Log(voiceZone.Global)
| + | |
− | }}
| + | |
− | | + | |
− | | + | |
− | =Members=
| + | |
− | | + | |
− | {{ScriptFunction|void|SetOverrideVoice|(bool enabled);|Set voice to override the original voice.|5=
| + | |
− | local thisObject=Space.Host.ExecutingObject<br>
| + | |
− | local voiceZone=thisObject.Children[0].VoiceZone<br>
| + | |
− | function Play()<br>
| + | |
− | voiceZone.SetOverrideVoice(true)<br>
| + | |
− | end
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|void|ClearOverrideVoice|();|Clear the overriding voice.|5=
| + | |
− | local thisObject=Space.Host.ExecutingObject<br>
| + | |
− | local voiceZone=thisObject.Children[0].VoiceZone<br>
| + | |
− | function Clear()<br>
| + | |
− | voiceZone.ClearOverrideVoice()<br>
| + | |
− | end
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|uint|AuthVideoUsers|{get;}|Return an array of auth video user.|5=
| + | |
− | local thisObject=Space.Host.ExecutingObject<br>
| + | |
− | local voiceZone=thisObject.Children[0].VoiceZone<br>
| + | |
− | local userVideo = voiceZone.AuthVideoUsers<br>
| + | |
− | for i=1,#userVideo do<br>
| + | |
− | Space.Log(userVideo[i])<br>
| + | |
− | end
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|void|AddAuthVoiceUser|(uint userID)|Add a user to AuthVoiceUser by his ID.|5=
| + | |
− | local thisObject=Space.Host.ExecutingObject<br>
| + | |
− | local voiceZone=thisObject.Children[0].VoiceZone<br>
| + | |
− | function Add()<br>
| + | |
− | local id=111;<br>
| + | |
− | voiceZone.AddAuthVoiceUser(id)<br>
| + | |
− | end
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|void|RemoveAuthVoiceUser|(uint userID)|Remove a user from AuthVoiceUser by his ID.|5=
| + | |
− | local thisObject=Space.Host.ExecutingObject<br>
| + | |
− | local voiceZone=thisObject.Children[0].VoiceZone<br>
| + | |
− | function Remove()<br>
| + | |
− | local id=111;<br>
| + | |
− | voiceZone.RemoveAuthVoiceUser(id)<br>
| + | |
− | end
| + | |
− | }}
| + | |
− | | + | |
− | {{Scripting Navbox}}
| + | |