Scatter: Difference between revisions

From StarLogo Nova Wiki
No edit summary
No edit summary
Line 1: Line 1:
{{#vardefine:scatter|<code>scatter</code>}}
{{#vardefine:Scatter|<code>Scatter</code>}}


== Usage ==
== Usage ==
<code>scatter</code> is used to scatter an agent to a random location in [[SpaceLand]].
<code>Scatter</code> is used to scatter an agent to a random location in [[SpaceLand]].


===Syntax===
===Syntax===
<code>scatter</code>
<code>Scatter</code>


==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:Scatter}} and {{#vardefineecho:cedol|<code>[[Scatter Everyone|scatter everyone</code>]]}} is that {{#vardefineecho:cedo|<code>scatter everyone</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 17:38, 8 August 2022


Usage

Scatter is used to scatter an agent to a random location in SpaceLand.

Syntax

Scatter

Nuances

An important difference between Scatter and scatter everyone is that scatter everyone 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.


scatter everyone can be useful for randomizing traits and scattering agents without effecting others.