Create Each Do: Difference between revisions

From StarLogo Nova Wiki
m (Reverted edits by Admin (talk) to last revision by Rev)
Tag: Rollback
No edit summary
Line 1: Line 1:
<translate>
[[Category: Agents]]
[[Category: Agents]]
<section begin=image/>[[File:Create Each Do.png|alt=The Create Each Do Block|thumb]]<section end=image/>
<section begin=image/>[[File:Create Each Do.png|alt=The Create Each Do Block|thumb]]<section end=image/>
<section begin="name" />'''<code>create [_] [▼](s) each do</code>'''<section end="name" /> is a [[code block]] part of the [[agents]] drawer.
<section begin="name" />'''<code>create [_] [▼](s) each do</code>'''<section end="name" /> is a [[code block]] part of the [[agents]] drawer.
</translate>


 
<translate>
== Usage==
== Usage==
<code>create [_] [▼](s) each do</code> is used to populate [[Spaceland]] with [[agent]]s and then run a [[stack]] of code individually for each agent. This can be useful for making many agents and setting different [[trait]]s for each.
<code>create [_] [▼](s) each do</code> is used to populate [[Spaceland]] with [[agent]]s and then run a [[stack]] of code individually for each agent. This can be useful for making many agents and setting different [[trait]]s for each.
</translate>


<translate>
===Syntax===
===Syntax===
<code>create [Textbox: Number of Agents to Create] [Dropdown: Type of Agent](s) each do [code]</code>
<code>create [Textbox: Number of Agents to Create] [Dropdown: Type of Agent](s) each do [code]</code>
</translate>


==Nuances==
==Nuances==

Revision as of 15:56, 16 June 2023

The Create Each Do Block

create [_] [▼](s) each do is a code block part of the agents drawer.

Usage

create [_] [▼](s) each do is used to populate Spaceland with agents and then run a stack of code individually for each agent. This can be useful for making many agents and setting different traits for each.

Syntax

create [Textbox: Number of Agents to Create] [Dropdown: Type of Agent](s) each do [code]

Nuances

create [_] [▼](s) each do is very similar to create [_] [▼](s). Both create agents, but generally create [_] [▼](s) each do allows for more complex and powerful usages.

Related Blocks

Relevant Video Resources

Relevant Activities