The SAudioSource class deals with the Audio Source component, which allows the object to play sounds in the scene.
Is the Audio Source component enabled?
function audioOnOff ()
end
hostObject.SubscribeToEvents();
hostObject.OnMouseDown(audioOnOff);
-- When the host object is clicked, the Audio Source component gets enabled, if it was disabled,
Is looping of the sound clip enabled?
Space.Log(hostObject.Audio.Loop);
-- False by default.
if not hostObject.Audio.Loop then
end
The Doppler level for the Audio Source. (See: Doppler Effect)
Space.Log(hostObject.Audio.DopplerLevel);
-- 1 by default
hostObject.Audio.DopplerLevel = 5;