Limiting Code Block Choices
Hello,
I am creating a new game that requires the player to use the agent (code blocks) to destroy 2 oak planks that are blocking entry to an important building. Before the agent may do this, he must have an iron axe in his first inventory slot. I have already constructed the code myself with blocks, but it was quite complex for the audience I have planned for this game. So, I am running into two key issues:
- How do you restrict the code blocks players can view and use based on a given scenario? I have seen it done with MEE's "Museum Heist" map.
- How can I restrict the functionality of code blocks? The "destroy" block is too powerful and could technically be used to smash through anything in the world that I built as of now. I need this to be limited to only oak plank blocks.
- Note: Using an "allow" block with adventure mode isn't sufficient enough, since anything above or below the oak planks can be destroyed too.
One other problem as well: If I put the player into Adventure Mode, then even their agent cannot destroy the blocks that need to be destroyed. Any ideas here?
-
1. To limit blocks you need to create a tutorial: https://makecode.com/tutorial-tool
2. To fix this problem you need a combination of allow and deny blocks. Place an allow beneath the two oak planks, and then a deny above them. The players will see the allow/deny blocks but this is unavoidable, my students don't mind seeing them, they don't really ask about them. I've told them what they are there for and how they work.
1 -
Hi Cameron! Thanks for providing this answer, it was the only thing in an hour of searching that led me to find the makecode.com tutorial documentation. That said I still don't know how to make a template that enables only specific block code blocks - do you know of any reference or example that could help me figure that out?
0
Please sign in to leave a comment.
Comments
2 comments