Up

From StarLogo Nova Wiki
Revision as of 18:32, 14 August 2023 by Admin (talk | contribs) (Marked this version for translation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Other languages:
The Up Block

Moves up by a specified number of steps.

Usage

Will move any agent upwards in the “z” direction by the number of steps specified.

Syntax

Inputs in this block:

  1. a number

Example

Up example gif
Up example code

The up block is useful to take advantage of the 3D features of StarLogo. By adding the up block, we create a more realistic model of predator-prey interactions and fish movement. To enable random vertical movement and keep all fish above ground, fish who fall below the valid range of z values are automatically raised above ground in the final if statement.

Related Blocks