Microsoft MakeCode

Tutorial building queries

A few quick questions on building custom tutorials for inside Minecraft.

  1. For using the template macro, is there a way to simply show the On Start block? Because it doesn’t have a javascript line (given code is just added to the top of the program), there doesn’t seem a clear way to just show on start (and not the run on command start block).

  2. For a multiple step tutorial, is there any way to stop the tutorial finishing? Aka, remove the finish button? I am aware for single step tutorials, you can use ### @hideIteration true which will also hide the Finish button, but can’t see a way to do the same for tutorials featuring steps. The main reason for an interest in this is limiting the blocks for the full challenge.

  3. Similar to question 2, is there a way to hide the exit tutorial button as well?

(1) is probably not possible with the version of pxt Minecraft is on.
(2/3) try adding the “lockedEditor=1“ query argument to the editor url

@jwunderl @shakao to chime in (1)

I think if you put just a // (empty comment) in the template it should work, that was actually a bug i caught immediately after the last release (in the hour of code tutorials) that we fixed (and pushed out as a patch).

Unfortunately @peli this doesn’t seem to have fixed it?
The URL used here was - https://minecraft.makecode.com/?ipc=1&lockedEditor=1&inGame=1#tutorial:44462-12976-83520-79935

@peli @jwunderl any thoughts on this?
Is going to take a decent sized redesign of my batch of tutorials if it isn’t possible to block students exiting a multi-stage tutorial like it is with hideiteration on a single stage tutorial.
In the end, question 1 isn’t the end of the world, 2/3 though are more showstoppers.

Oops, missed that update, sorry.

1 should be resolved with empty comment in template; here’s the one I replaced them with when fixing the bug where it was showing up:

```template
//
```

which worked properly.

From the look of it the query param for lockedEditor was added after the release; it was originally added as just a target flag, then exposed with the query parameter when it was needed for another feature (here), which is not in the currently minecraft release (uses v5.33.16, lockedEditor param was first added in v5.34.9)

This is how it looks with that change: https://minecraft.makecode.com/beta?ipc=1&lockedEditor=1&inGame=1#tutorial:44462-12976-83520-79935 / will look after next minecraft release, but I don’t remember when that will be / if it’s on the docket right away.

This is perfect, thanks @jwunderl. I am due to be teaching using this particular world in the coming days and the ability to limit students access to the full code builder is pretty important, so I will hedge my bets with the beta version and see how it goes :crossed_fingers: