(function(){ this.replaceAvatar = function(entityID) { print("I AM CALLED"); MyAvatar.useFullAvatarURL(Entities.getEntityProperties(entityID,"modelURL").modelURL); }; this.replaceAvatarByMouse = function(entityID, mouseEvent) { if (mouseEvent.isLeftButton) { this.replaceAvatar(entityID); } }; this.clickDownOnEntity = this.replaceAvatarByMouse; this.startFarTrigger = this.replaceAvatar; this.startNearTrigger = this.replaceAvatar; });