diff --git a/scripts/communityScripts/notificationCore/notificationCore.js b/scripts/communityScripts/notificationCore/notificationCore.js index f7ab6e73cd..a085e3b15b 100644 --- a/scripts/communityScripts/notificationCore/notificationCore.js +++ b/scripts/communityScripts/notificationCore/notificationCore.js @@ -22,7 +22,12 @@ var DEFAULT_OFFSET = 10; var FLOOF_NOTIFICATION_CHANNEL = "Floof-Notif"; var MAIN_CHAT_APP_CHANNEL = "Chat"; var ARROW_REGEX = /\</gi; - +var notificationSound = SoundCache.getSound(Script.resolvePath("resources/click.wav")); +var soundInjectorOptions = { + localOnly: true, + position: MyAvatar.position, + volume: 0.04 +}; var offset = DEFAULT_OFFSET; @@ -48,6 +53,7 @@ function messageReceived(channel, message, sender, local) { } } else { notificationCore.add(cmd.text, cmd.sender, cmd.colour); + playSound(); } } } @@ -113,6 +119,10 @@ function cleanUp() { }); } +function playSound() { + Audio.playSound(notificationSound, soundInjectorOptions); +} + function notif(text, colour) { var noti = { diff --git a/scripts/communityScripts/notificationCore/resources/click.wav b/scripts/communityScripts/notificationCore/resources/click.wav new file mode 100644 index 0000000000..150a59d1da Binary files /dev/null and b/scripts/communityScripts/notificationCore/resources/click.wav differ