Skip to main content

Block Code Editor tutorial template to hide certain code blocks

Comments

6 comments

  • Jeff Ginger

    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
    ```template
    agent.teleportToPlayer()
    player.onTravelled(WALK, function () {
    })
    ```

    ```blocks
    player.say(":)")
    agent.teleportToPlayer()
    player.onTravelled(WALK, function () {
       
    })
    ```
    ## Step 1
    Put blocks you want players to start with in the template section

    ## Step 2
    Place blocks you want available generally to the player in the blocks section

    ## Step 3
    You can get block identifiers from the java code editor
    1
  • Jeff Ginger

    2
  • Debbie Alexander
    Moderator Beacon of Knowledge Super Star

    Great contribution, Jeff! Thanks.

    1
  • Jeff Ginger

    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
  • Cameron Ross

    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
  • Jeff Ginger

    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/#example

    0

Please sign in to leave a comment.