Create Each Do: Difference between revisions
No edit summary Tag: Manual revert |
No edit summary |
||
Line 15: | Line 15: | ||
<section begin=image/>[[File:Create Each Do Nums1.png|left|alt=The Create Each Do Block|thumb]]<section end=image/> | <section begin=image/>[[File:Create Each Do Nums1.png|left|alt=The Create Each Do Block|thumb]]<section end=image/> | ||
<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> | ||
*Inputs: | |||
**a number in the socket | |||
**a breed from the dropdown menu | |||
<!--T:15--> | <!--T:15--> |
Revision as of 15:24, 20 July 2023
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]
- Inputs:
- a number in the socket
- a breed from the dropdown menu
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.