// will be called with arguments function Setup(params) { this.listScriptURLs = params.listScriptURLs || []; // walking script, nametag script, messages? this.avatarURL = params.avatarURL || ""; this.displayName = params.displayName || ""; } Setup.prototype = { run: function () { this.listScriptURLs.forEach(function(scriptURL) { print("3"); ScriptDiscoveryService.loadScript(scriptURL); }); if (this.avatarURL) { print("1"); MyAvatar.skeletonModelURL = this.avatarURL; } if (this.displayName) { print("2"); MyAvatar.displayName = this.displayName; } Script.setTimemout(function () { Script.stop(); }, 2000); } // unload: function () { // this.listScriptURLs.forEach(function(scriptURL) { // ScriptDiscoveryService.stopScript(scriptURL); // }); // } }; module.exports = Setup;