Pen: Difference between revisions

From StarLogo Nova Wiki
No edit summary
Line 14: Line 14:
==Nuances==
==Nuances==


An important difference between {{#var:create}} and {{#vardefineecho:cedol|<code>[[Create Each Do|create [_] [▼](s) each do</code>]]}} is that {{#vardefineecho:cedo|<code>create [_] [▼](s) each do</code>}} allows a section of code to run individually for each [[agent]] that is created. {{#var:create}} only creates agents with the default [[trait]]s in the center of [[Spaceland]].
An important difference between {{#var:create}} and {{#vardefineecho:cedol|<code>[[Stamp|stamp [_]</code>]]}} is that {{#vardefineecho:cedo|<code>create [_] [▼](s) each do</code>}} allows a section of code to run individually for each [[agent]] that is created. {{#var:create}} only creates agents with the default [[trait]]s in the center of [[Spaceland]].


{{#var:cedol}} can be useful for [[randomizing traits]] and [[scattering agents without effecting others]].
{{#var:cedol}} can be useful for [[randomizing traits]] and [[scattering agents without effecting others]].

Revision as of 19:53, 10 November 2022


pen [▼] is a code block part of the Environment drawer.

Usage

pen [▼](s) adjusts the pen tool. If the pen is down, the agent stamps the terrain at each position as it moves. If the pen is up, the agent does not stamp the terrain.

Syntax

pen [Dropdown: Down/Up]

Nuances

An important difference between and stamp [_] is that create [_] [▼](s) each do allows a section of code to run individually for each agent that is created. only creates agents with the default traits in the center of Spaceland.

stamp [_] can be useful for randomizing traits and scattering agents without effecting others.

Related Blocks

Relevant Video Resources

Relevant Activities