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: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]].
An important difference between {{#var:Scatter}} and {{#vardefineecho:cedol|<code>[[Scatter Everyone|scatter everyone</code>]]}} is that {{#vardefineecho:cedo|<code>scatter everyone</code>}} scatters all agents in SpaceLand to random locations. {{#var:scatter}} only scatters the agents created by the [[create]] or [[create each do]] block in which the [[scatter]] block was placed.


   
   


{{#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:44, 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 scatters all agents in SpaceLand to random locations. only scatters the agents created by the create or create each do block in which the scatter block was placed.


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