Skip to main content

Build Wall

Raises the terrain height at the location of the agent by an amount given by the input.

Build Wall block

Description

The Build Wall block raises the terrain height at the location of the agent by an amount given by the input. This is a code block part of the Environment drawer.

Usage

Build Wall creates a vertical elevation in the terrain at the agent's current position. This block is useful for creating barriers, walls, or elevated platforms in your simulations. The height increase is additive to the existing terrain height.

Syntax

Input:

  • A number specifying the amount to raise the terrain height

Example

When setup is pushed, a wall is built by an agent moving up in the middle of the world. The agent is deleted once it reaches the end of the world. To make the wall instantly, you could put the build wall 10 and forward 1 block inside of a repeat 100 times block, which creates the wall in one engine tick instead of 100.

Build Wall example code 1Build Wall example code 2

Notes

  • The terrain height is raised at the exact position of the agent
  • Multiple uses of this block at the same location will continue to increase the terrain height
  • The wall created is a single point elevation - to create longer walls, move the agent while using this block repeatedly
  • Build Mound - Creates a mound with specified height and width
  • Reset Terrain - Resets the terrain to its default state
  • Terrain Height - Returns the height of the terrain at a specific location