Play sound when turning camera on

This commit is contained in:
Zach Fox 2017-07-12 16:39:56 -07:00
parent 6237b5fc0a
commit a4d95f9bf8
2 changed files with 6 additions and 0 deletions

View file

@ -94,6 +94,11 @@
if (button) {
button.editProperties({ isActive: onSpectatorCameraScreen || camera });
}
Audio.playSound(CAMERA_ON_SOUND, {
volume: 0.15,
position: cameraPosition,
localOnly: true
});
}
// Function Name: spectatorCameraOff()
@ -500,6 +505,7 @@
}
// These functions will be called when the script is loaded.
var CAMERA_ON_SOUND = SoundCache.getSound(Script.resolvePath("cameraOn.wav"));
startup();
Script.scriptEnding.connect(shutdown);