wiki.sine.space | sinespace

Scripting/SVoiceZone

From wiki.sine.space
Revision as of 04:05, 13 October 2021 by Voidtech (Talk | contribs)

Jump to: navigation, search

Properties

Enabled

bool Enabled {get; set;}

Whether the Voice Zone component is Enabled or not

local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone
Space.Log(voiceZone.Enabled)


--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)

AllowVoice

bool AllowVoice {get; set;}

Whether allows voice.

local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone
Space.Log(voiceZone.AllowVoice)


AllowVideo

bool AllowVideo {get; set;}

Whether allows video.

local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone
Space.Log(voiceZone.AllowVideo)


Priority

int Priority {get;}

The priority of the voice zone

local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone
Space.Log(voiceZone.Priority)


AreaName

string AreaName {get;}

The name of area.

local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone
Space.Log(voiceZone.AreaName)


Spatialized

bool Spatialized {get;}

Whether the voice zone is spatialized.

local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone
Space.Log(voiceZone.Spatialized)


SpatialDropoff

bool SpatialDropoff {get;}

Whether the voice zone is spatialized drop off.

local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone
Space.Log(voiceZone.SpatialDropoff)


SpatialStereo

bool SpatialStereo {get;}

Whether the voice zone is spatial stereo.

local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone
Space.Log(voiceZone.SpatialStereo)


SpatialDistance

float SpatialDistance {get;}

The spatial distance of the voice zone.

local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone
Space.Log(voiceZone.SpatialDistance)



Global

bool Global {get;}

Whether the voice zone is global.

local voiceZone=Space.Host.GetReference("VoiceZone").VoiceZone
Space.Log(voiceZone.Global)



Members

SetOverrideVoice

void SetOverrideVoice (bool enabled);

Set voice to override the original voice.

local thisObject=Space.Host.ExecutingObject

local voiceZone=thisObject.Children[0].VoiceZone
function Play()
    voiceZone.SetOverrideVoice(true)

end


ClearOverrideVoice

void ClearOverrideVoice ();

Clear the overriding voice.

local thisObject=Space.Host.ExecutingObject

local voiceZone=thisObject.Children[0].VoiceZone
function Clear()
    voiceZone.ClearOverrideVoice()

end


AuthVideoUsers

uint AuthVideoUsers {get;}

Return an array of auth video user.

local thisObject=Space.Host.ExecutingObject

local voiceZone=thisObject.Children[0].VoiceZone
local userVideo = voiceZone.AuthVideoUsers
for i=1,#userVideo do
    Space.Log(userVideo[i])

end


AddAuthVoiceUser

void AddAuthVoiceUser (uint userID)

Add a user to AuthVoiceUser by his ID.

local thisObject=Space.Host.ExecutingObject

local voiceZone=thisObject.Children[0].VoiceZone
function Add()
    local id=111;
    voiceZone.AddAuthVoiceUser(id)

end


RemoveAuthVoiceUser

void RemoveAuthVoiceUser (uint userID)

Remove a user from AuthVoiceUser by his ID.

local thisObject=Space.Host.ExecutingObject

local voiceZone=thisObject.Children[0].VoiceZone
function Remove()
    local id=111;
    voiceZone.RemoveAuthVoiceUser(id)

end