How to Edit Levels

You can save one or more edited terrain as "levels" and load one at a time as needed for your game or model.

Getting Started

In the Spaceland window, locate the Runtime tab and click the "Level" tab next to it. This is where all of your created levels will appear. Level 0 acts as your default level so any saved changes made here will remain even if other levels are created. To make it noticeable that a level is actually different from another, change the terrain of the default level and save.

Creating Levels

To create a level, click on the "New Level" button at the bottom of the window. This will create a new level. To change the name of the level, simply double click and type a new title. After creating a new level, you should notice that the changes you made on level 0 will not affect level 1. A new level returns the terrain to the original blank state. However, it does not affect the previous positions of agents in Spaceland.

Saving Levels

As you make changes, remember to click "Save Levels" regularly.

Restoring Levels

Clicking "Restore Level" will undo all changes since the last time you saved. In the example, the user made a few changes to the default green terrain and then clicked Restore Level without saving so the result is the default terrain.

Deleting Levels

If you want to get rid of a level entirely, select the level and click "Delete Level".

"Levels" blocks

You can also programmatically change, save, and reload levels, as well as report the current level using blocks. These blocks are found in the Terrain drawer. Note that the change level block takes a text argument, which is the name of the level and must be exactly as you named it in the Levels tab, including capital letters. The change level block affects what the user sees, but doesn't affect the agents.

"Levels" blocks for agents

To affect which level an agent is on, you need to instruct the agents to set their level. This block is found in the traits drawer. The level block reports the current level of the agent.

Example

Let's say that you want to change to a new level once the player has at least 10 points on the current level. Use an If block to have the player-controlled agent check to see if the score is greater than or equal to 10 and the level is the current level. If both conditions are true, then the agent changes the world's level to the next level and also sets its own location to that new level. Again, the green "change level" block affects what the player sees - that is, the "world" in Spaceland, while the "set level" ensures that the agent knows what level it's supposed to be in.