Create Each Do: Difference between revisions
No edit summary |
(add tooltip text) |
||
Line 5: | Line 5: | ||
[[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" /> | ||
<p id="tooltip">Creates the specified number of agents of the selected breed. Each newly created agent immediately follows the directions specified in "do".</p> | |||
'''<code>create [_] [▼](s) each do</code>'''<section end="name" /> is a [[code block]] part of the [[agents]] drawer. | |||
<!--T:13--> | <!--T:13--> | ||
== 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. | |||
<!--T:14--> | <!--T:14--> |
Revision as of 14:13, 8 August 2023
Creates the specified number of agents of the selected breed. Each newly created agent immediately follows the directions specified in "do".
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
Inputs in this block:
- a number in the socket
- a breed from the dropdown menu
- relevant 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.