Scatter Everyone: Difference between revisions

From StarLogo Nova Wiki
(Marked this version for translation)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
<languages/>
<translate>
<!--T:1-->
[[Category:Agents]]
[[Category:Agents]]
<section begin=image/>[[File:Scatter Everyone.png|thumb|229x229px]]<section end=image/>
<section begin=image/>[[File:Scatter Everyone.png|thumb|229x229px]]<section end=image/><p id="tooltip">Sets all the agents' locations to random positions in SpaceLand.</p>
{{#vardefine:ScatterEveryone|<code>scatter everyone</code>}}
<section begin=name/>'''<code>scatter everyone</code>'''<section end=name/> is a [[code block]] part of the [[agents]] drawer.


== Usage ==
<!--T:10-->
<p id="tooltip"><code>scatter everyone</code> is used to scatter all agents in [[SpaceLand]] to random locations.</p>
{{#vardefine:ScatterEveryone|<code>scatter everyone</code>}}<section begin=name/>'''<code>scatter everyone</code>'''<section end=name/> is a [[code block]] part of the [[agents]] drawer.


<!--T:2-->
==Usage==
<code>scatter everyone</code> is used to scatter all agents in [[SpaceLand]] to random locations.
<!--T:11-->
<strong>Note:</strong> if this block is used in an breed tab where more than one agent of that breed exists, each individual agent of this breed will scatter everyone once.  For example, if there are five agents of the breed, everyone will be scattered 5 times as each individual agent runs the code. 
==Syntax== <!--T:3-->
<!--T:4-->
<code>(in reference to every agent) scatter everyone</code>
==Example== <!--T:12-->
<!--T:13-->
[[File:scatter_everyone_example.gif|alt=Scatter Everyone example gif|thumb]]
[[File:scatter_everyone_example.png|alt=Scatter Everyone example code|thumb]]
<!--T:14-->
The scatter everyone block scatters all agents in spaceland by assigning each one random x and y coordinates.  If this block is called by The World, all agents are scattered once.
<!--T:5-->
==Nuances==
==Nuances==
An important difference between {{#var:ScatterEveryone}} and {{#vardefineecho:Scatter|<code>[[Scatter|scatter</code>]]}} is that {{#vardefineecho:Scatter|<code>scatter</code>}} scatters only the agents attached to the {{#vardefineecho:Scatter|<code>scatter</code>}} block. {{#var:ScatterEveryone}} scatters all agents in [[SpaceLand]].
An important difference between {{#var:ScatterEveryone}} and {{#vardefineecho:Scatter|<code>[[Scatter|scatter</code>]]}} is that {{#vardefineecho:Scatter|<code>scatter</code>}} scatters only the agents attached to the {{#vardefineecho:Scatter|<code>scatter</code>}} block. {{#var:ScatterEveryone}} scatters all agents in [[SpaceLand]].


<!--T:6-->
==Related Blocks==
==Related Blocks==
{{#vardefineecho:Scatter|<code>[[Scatter|scatter</code>]]}}
{{#vardefineecho:Scatter|<code>[[Scatter|scatter</code>]]}}


==Relevant Video Resources==
==Relevant Video Resources== <!--T:7-->


<!--T:8-->
==Relevant Activities==
==Relevant Activities==
[[Category:Code Block]]
[[Category:Code Block]]
</translate>

Latest revision as of 18:15, 11 August 2023

Other languages:
Scatter Everyone.png

Sets all the agents' locations to random positions in SpaceLand.

scatter everyone is a code block part of the agents drawer.

Usage

scatter everyone is used to scatter all agents in SpaceLand to random locations.

Note: if this block is used in an breed tab where more than one agent of that breed exists, each individual agent of this breed will scatter everyone once. For example, if there are five agents of the breed, everyone will be scattered 5 times as each individual agent runs the code.

Syntax

(in reference to every agent) scatter everyone

Example

Scatter Everyone example gif
Scatter Everyone example code

The scatter everyone block scatters all agents in spaceland by assigning each one random x and y coordinates. If this block is called by The World, all agents are scattered once.

Nuances

An important difference between scatter everyone and scatter is that scatter scatters only the agents attached to the scatter block. scatter everyone scatters all agents in SpaceLand.

Related Blocks

scatter

Relevant Video Resources

Relevant Activities