Create Each Do: Difference between revisions

From StarLogo Nova Wiki
No edit summary
(Marked this version for translation)
Line 16: Line 16:
<!-- <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> -->


<!--T:19-->
Inputs in this block:
Inputs in this block:
#a number in the socket
#a number in the socket

Revision as of 15:56, 20 July 2023

Other languages:
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

The Create Each Do Block

Inputs in this block:

  1. a number in the socket
  2. a breed from the dropdown menu
  3. 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.

Related Blocks

Relevant Video Resources

Relevant Activities