// Created by Adrian // preloads sound and plays on entry to the entity // Adrian McCarlie // Creative Commons attribution CC BY 4.0 // http://creativecommons.org/licenses/by/4.0/ (function(entityID){ var location; var soundURL; this.preload=function(entityID) { soundURL = SoundCache.getSound("http://mpassets.highfidelity.com/14e19e59-5844-42f8-8ac4-904551f27c4e-v1/sounds/eiree.wav"); location = Entities.getEntityProperties(entityID).position; } this.enterEntity = function(entityID) { Audio.playSound(soundURL, { loop: false, position: location ,volume: 0.5 }); } })