Block Code Editor tutorial template to hide certain code blocks
I've noticed many of the official Education Edition tutorials restrict the type of code blocks participants have access to. I'd like to do something like this for our participants, as many of them get side-tracked spawning monsters or animals and others have trouble finding the specific code blocks they want or need - the sheer number can be overwhelming.
The makecode tutorial creation tool makes it pretty easy to set up stages for a tutorial that I presumably could share from in-game and I've been able to figure out how to hide ALL blocks using the control options but I still can't find an example template or block reference listing for how to tell the editor to display only specific blocks that I want kids using in a given level. Does anyone know where I might find this? Are they referred to by their python or java names somehow?
It seems like it would fit well with other simple world creation references, like how to reset the agent on an arrow pointer block similar to how the official levels have a restart option. Thanks!
-
Thanks to Debbie Alexander I was able to figure this out, based on her post here. Here's my example template that might help others:
# My Tutorial```templateagent.teleportToPlayer()player.onTravelled(WALK, function () {})```
```blocksplayer.say(":)")agent.teleportToPlayer()player.onTravelled(WALK, function () {})```## Step 1Put blocks you want players to start with in the template section
## Step 2Place blocks you want available generally to the player in the blocks section
## Step 3You can get block identifiers from the java code editor1 -
2
-
Great contribution, Jeff! Thanks.
1 -
I'm continuing to update the template as I learn about more things that work in it, see the latest at https://publish.illinois.edu/stemc-minecraft/education-edition/mcee-curriculum/#resources
If anybody knows how to get the search box to show up or how to insert headers or rearrange the order of blocks within the sidebar lemme know!
1 -
Hi Jeff Ginger, a triple # will make a header for each page in a tutorial. I don't know how to add a search box or rearrange the order, but there is a command to get rid of the menus and just have the blocks (I don't know it though)
I've pasted the first part of one of my tutorials below. Happy to send the whole file if you can send me your email address or the moderators can connect us outside of the forum.
There are a few other bits of markup code for the tutorial editor that took me a while to learn
@showdialogue makes that slide on the tutorial pop out and add a "Next" button
```template give the students some starter blocks
```blocks shows the students a hint
```ghost provides access to blocks without putting them in the workspace or hint
``|| agent.text ||`` will make the text the same colour as the block menu (you need to change the first word to the name of the menu)Let me know if you have questions, I might be able to help
# Conditional Mazes 1
## Page 1 @showdialogue### Activity: Conditional Mazes 1
In this activity you need to complete a series of mazes. You must use a ``||logic:conditional statement||`` to teach your Agent how to solve any maze.
Challenge yourself to complete each maze using just one click of the stick!## Page 2
### Tasks 1 - 4: Build your Conditional Statement
Before you begin the mazes, you need to carefully build your ``||logic:conditional statement||``.
Once it has been built, it will be easy to modify the ``||logic:conditional statement||`` to suit any maze.Start with an ``||logic:if-then-else||`` block and place a ``||logic:comparison||`` block on top of the word "true". Make sure the comparison block is set to "=".
Inside the ``||logic:comparison||`` block you need to place an ``||agent:agent inspect||`` block and a ``||blocks:blocks||`` block. Set the block to "air".
See the hint for some images that will help you build the ``||logic:conditional statement||``.
```template
player.onItemInteracted(STICK, function () {})
player.onItemInteracted(BLAZE_ROD, function () {
})
```
```blocks
player.onItemInteracted(STICK, function () {})
```2 -
Thank you so much Cameron Ross It looks like my most recent post may not have gone through, but I've been gathering each little bit I learn in documentation our grant website. I've added your notes to what I have here:
https://publish.illinois.edu/stemc-minecraft/education-edition/mcee-tutorials/#example0
Please sign in to leave a comment.
Comments
6 comments