Up: Difference between revisions
(Marked this version for translation) |
(updates from Blockument) |
||
Line 1: | Line 1: | ||
<languages/> | <languages/> | ||
<translate> | <translate> | ||
<section begin="image"/>[[File:up.png|alt=The Up Block|thumb]]<section end="image"/> | |||
<!--T:2--> | <!--T:2--> | ||
<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== | |||
Will move any agent upwards in the “z” direction by the number of steps specified. | |||
==Syntax== | |||
Inputs in this block: | |||
#a number | |||
==Example== | |||
[[File:up_example.gif|alt=Up example gif|thumb]] | |||
[[File:up_example.png|alt=Up example code|thumb]] | |||
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== | |||
*[[Special:MyLanguage/Down|Down]] | |||
<!--T:1--> | <!--T:1--> |
Revision as of 18:32, 14 August 2023
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:
- a number
Example
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.