Down/en: Difference between revisions

From StarLogo Nova Wiki
(Updating to match new version of source page)
(Updating to match new version of source page)
 
Line 16: Line 16:
==Example==
==Example==


[[File:down_example.gif|alt=Down example gif|thumb]]
[[File:up_example.gif|alt=Down example gif|thumb]]
[[File:down_example.png|alt=Down example code|thumb]]
[[File:up_example.png|alt=Down example code|thumb]]


The down block is useful to take advantage of the 3D features of StarLogo. By adding the down block this becomes a more realistic model 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 [[Special:MyLanguage/If|if]] statement.
The down block is useful to take advantage of the 3D features of StarLogo. By adding the down block this becomes a more realistic model 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 [[Special:MyLanguage/If|if]] statement.

Latest revision as of 18:36, 16 August 2023

Other languages:
The Down Block

Moves down by a specified number of steps.

Usage

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

Syntax

Inputs in this block:

  1. a number

Example

Down example gif
Down example code

The down block is useful to take advantage of the 3D features of StarLogo. By adding the down block this becomes a more realistic model 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