--clicking the object will toggle between two different AudioReactiveLight targets--[Add "light1" and "light2" reference to the Scripting Runtime component]thisGameObject = Space.Host.ExecutingObjectlight1 = Space.Host.GetReference("light1").Lightlight2 = Space.Host.GetReference("light2").LightOnClick=function()if thisGameObject.AudioReactiveLight.Target == light1 then thisGameObject.AudioReactiveLight.Target = light2else thisGameObject.AudioReactiveLight.Target = light1endendthisGameObject.AddClickable()thisGameObject.Clickable.OnClick(OnClick)
--the below script will make the object toggle it's AudioReactiveLight's Range property--[Add "arlight" reference to the Scripting Runtime component]thisGameObject = Space.Host.ExecutingObjectarlight = Space.Host.GetReference("arlight").AudioReactiveLightOnClick=function()arlight.Range=not arlight.RangeendthisGameObject.AddClickable()thisGameObject.Clickable.OnClick(OnClick)
MinRange
float MinRangegetset
Returns MinRange value of the Audio Reactive Light.
--the below script will make a slider set the Audio Reactive Light's MinRange--[Add "slider" and "arlight" references to the Scripting Runtime component]arlight = Space.Host.GetReference("arlight").AudioReactiveLightslider = Space.Host.GetReference("slider").UISliderOVC=function()arlight.MinRange = (slider.Value *9) +1--(from 1 to 10)endslider.OnValueChanged(OVC)
MaxRange
float MaxRangegetset
Returns MaxRange value of the Audio Reactive Light.
--the below script will make a slider set the Audio Reactive Light's MaxRange--[Add "slider" and "arlight" references to the Scripting Runtime component]arlight = Space.Host.GetReference("arlight").AudioReactiveLightslider = Space.Host.GetReference("slider").UISliderOVC=function()arlight.MaxRange= (slider.Value *10) +10--(from 10 to 20)endslider.OnValueChanged(OVC)
--the below script will make the object Enable/Disable it's AudioReactiveLight's AnimateColor property--[Add "arlight" reference to the Scripting Runtime component]thisGameObject = Space.Host.ExecutingObjectarlight = Space.Host.GetReference("arlight").AudioReactiveLightOnClick=function()arlight.AnimateColor =not arlight.AnimateColorendthisGameObject.AddClickable()thisGameObject.Clickable.OnClick(OnClick)
--clicking the object will open a color picker that changes AudioReactiveLight's MinColor--[Add "arlight" reference to the Scripting Runtime component]thisGameObject = Space.Host.ExecutingObjectarlight = Space.Host.GetReference("arlight").AudioReactiveLightoriginalColor =nilOnChange=function(SColor) arlight.MinColor = SColorendOnSelect=function(SColor) arlight.MinColor = SColorendOnCancel=function() arlight.MinColor = originalColorendOnClick=function()originalColor = arlight.MinColorSpace.Dialogues.ColorPicker("Pick a color","Ok", OnChange, OnSelect, OnCancel, originalColor)endthisGameObject.AddClickable()thisGameObject.Clickable.OnClick(OnClick)
--clicking the object will open a color picker that changes AudioReactiveLight's MaxColor--[Add "arlight" reference to the Scripting Runtime component]thisGameObject = Space.Host.ExecutingObjectarlight = Space.Host.GetReference("arlight").AudioReactiveLightoriginalColor =nilOnChange=function(SColor) arlight.MaxColor= SColorendOnSelect=function(SColor) arlight.MaxColor= SColorendOnCancel=function() arlight.MaxColor= originalColorendOnClick=function()originalColor = arlight.MaxColorSpace.Dialogues.ColorPicker("Pick a color","Ok", OnChange, OnSelect, OnCancel, originalColor)endthisGameObject.AddClickable()thisGameObject.Clickable.OnClick(OnClick)
--the below script will make the object Enable/Disable it's AudioReactiveLight's Intensity property--[Add "arlight" reference to the Scripting Runtime component]thisGameObject = Space.Host.ExecutingObjectarlight = Space.Host.GetReference("arlight").AudioReactiveLightOnClick=function()arlight.Intensity =not arlight.IntensityendthisGameObject.AddClickable()thisGameObject.Clickable.OnClick(OnClick)
MinIntensity
float MinIntensitygetset
Returns MinIntensity value of the Audio Reactive Light.
--the below script will make a slider set the Audio Reactive Light's MinIntensity--[Add "slider" and "arlight" references to the Scripting Runtime component]arlight = Space.Host.GetReference("arlight").AudioReactiveLightslider = Space.Host.GetReference("slider").UISliderOVC=function()arlight.MinIntensity= (slider.Value *1) --(from 0 to 1)endslider.OnValueChanged(OVC)
MaxIntensity
float MaxIntensitygetset
Returns MaxIntensity value of the Audio Reactive Light.
--the below script will make a slider set the Audio Reactive Light's MaxIntensity--[Add "slider" and "arlight" references to the Scripting Runtime component]arlight = Space.Host.GetReference("arlight").AudioReactiveLightslider = Space.Host.GetReference("slider").UISliderOVC=function()arlight.MaxIntensity= (slider.Value *2) +1--(from 1 to 3)endslider.OnValueChanged(OVC)