Skip to content

[Levelbuilder] Making and Using Templates

Ken Akiha edited this page Feb 21, 2024 · 2 revisions

Making and Using Templates

Level templates save and carry over code from the workspace across multiple levels.

This means that a users code from a previous level will get carried to the next level that’s also using that template. However, every time the code in the workspace changes, every level using that template will be updated to that change. This overwrites progress from previous levels.

There’s a few things to know before you move on:

  • Your template must be the same level type as the level using it.

  • Blockly: If you want to edit the workspace blocks in a specific way (I.e, make a block unmovable), you’ll need to save and edit that in the template.

    Read more about the Blockly Workspace Editors here: [link]

Making a Template

  1. Make a new level in your chosen type. This needs to be the same type as the level that will be linked to the template.

  2. Give this level a name, following this pattern:

    [name] + template

This isn’t required, it’s just a standard naming convention

  1. Edit the toolbox and starter code to your liking and save it. Remember the name of it, you'll use it later.
  • AppLab: If you want to include a dataset with this level, you'll need to set that here on the template level.

Using a Template

  1. Go to a level you want to add a template to.

  2. In the level editor, find the section that says "Project Template Level Name" and add the name of your template in the textbox.

    image

  3. Save the level and repeat the process for any other levels that will be using this same template.

Clone this wiki locally