Up: Difference between revisions

From StarLogo Nova Wiki
(updates from Blockument)
(Marked this version for translation)
 
Line 2: Line 2:
<translate>
<translate>


<!--T:3-->
<section begin="image"/>[[File:up.png|alt=The Up Block|thumb]]<section end="image"/>
<section begin="image"/>[[File:up.png|alt=The Up Block|thumb]]<section end="image"/>


Line 7: Line 8:
<p id="tooltip">Moves up by a specified number of steps.</p>
<p id="tooltip">Moves up by a specified number of steps.</p>


==Usage==
==Usage== <!--T:4-->


<!--T:5-->
Will move any agent upwards in the “z” direction by the number of steps specified.
Will move any agent upwards in the “z” direction by the number of steps specified.


==Syntax==
==Syntax== <!--T:6-->


<!--T:7-->
Inputs in this block:
Inputs in this block:
#a number
#a number


==Example==
==Example== <!--T:8-->


<!--T:9-->
[[File:up_example.gif|alt=Up example gif|thumb]]
[[File:up_example.gif|alt=Up example gif|thumb]]
[[File:up_example.png|alt=Up example code|thumb]]
[[File:up_example.png|alt=Up example code|thumb]]


<!--T:10-->
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 [[Special:MyLanguage/If|if]] statement.
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 [[Special:MyLanguage/If|if]] statement.


==Related Blocks==
==Related Blocks== <!--T:11-->


<!--T:12-->
*[[Special:MyLanguage/Down|Down]]
*[[Special:MyLanguage/Down|Down]]



Latest revision as of 18:32, 14 August 2023

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