diff --git a/tutorial/ownershipToken.js b/tutorial/ownershipToken.js index 745eee44e4..b76f3af1c2 100644 --- a/tutorial/ownershipToken.js +++ b/tutorial/ownershipToken.js @@ -185,3 +185,5 @@ OwnershipToken.prototype = { Script.setTimeout(checkOwnershipRequest.bind(this), 2000); }, }; + +debug("Returning from ownershipToken"); diff --git a/tutorial/tutorialZone.js b/tutorial/tutorialZone.js index 6c78d678b4..42565aa99b 100644 --- a/tutorial/tutorialZone.js +++ b/tutorial/tutorialZone.js @@ -27,10 +27,14 @@ if (!Function.prototype.bind) { } (function() { - var ownershipTokenPath = Script.resolvePath("ownershipToken.js"); - var tutorialPath = Script.resolvePath("tutorial.js"); - Script.include(ownershipTokenPath); - Script.include(tutorialPath); + Script.include("ownershipToken.js"); + Script.include("tutorial.js"); + + var CHANNEL_AWAY_ENABLE = "Hifi-Away-Enable"; + function setAwayEnabled(value) { + var message = value ? 'enable' : 'disable'; + Messages.sendLocalMessage(CHANNEL_AWAY_ENABLE, message); + } var TutorialZone = function() { print("TutorialZone | Creating"); @@ -65,7 +69,9 @@ if (!Function.prototype.bind) { if (!this.token) { print("TutorialZone | Creating token"); // The start zone has been entered, hide the overlays immediately + setAwayEnabled(false); Menu.setIsOptionChecked("Overlays", false); + MyAvatar.shouldRenderLocally = false; this.token = new OwnershipToken(Math.random() * 100000, this.entityID, { onGainedOwnership: function(token) { print("TutorialZone | GOT OWNERSHIP"); @@ -100,6 +106,8 @@ if (!Function.prototype.bind) { // re-enable the HUD/Overlays if (!self.tutorialManager) { Menu.setIsOptionChecked("Overlays", true); + MyAvatar.shouldRenderLocally = true; + setAwayEnabled(true); } },