Skip to main content

Reset Terrain

Resets SpaceLand's terrain (ground) to its default color, heights, and/or custom traits.

Reset Terrain block

Description

The Reset Terrain block resets SpaceLand's terrain (ground) to its default color, heights, and/or custom traits. This is a code block part of the Environment drawer.

Usage

Reset Terrain restores the terrain to its initial state. You can choose to reset all terrain properties or only specific traits. This is particularly useful when creating procedurally generated terrain or when you need to clear modifications made during a simulation.

Syntax

Inputs:

  • Select "all" or a trait from the dropdown menu

Example

When set up is pushed, a new mountainous terrain is created changing the terrain heights and colors across the world. Each time, the terrain has to be reset with the reset terrain all block before the new terrain is created, so the mountains do not keep building on top of each other and the colors can be consistent.

Reset Terrain example code

Notes

  • Using "all" resets terrain colors, heights, and all custom traits to their default values
  • Selecting a specific trait will only reset that trait while preserving other terrain modifications
  • This block is essential for creating consistent starting conditions in simulations with terrain modifications
  • Stamp - Creates a mark on the terrain
  • Pen - Continuously marks the terrain as agent moves
  • Terrain Color - Gets or sets terrain color at a location
  • Terrain Height - Returns the height of the terrain
  • Build Mound - Creates a mound with specified dimensions
  • Build Wall - Raises terrain height at agent location