Create/en: Difference between revisions

From StarLogo Nova Wiki
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 3: Line 3:


[[Category:Agents]]
[[Category:Agents]]
<section begin=image/>[[File:Create Block.png|alt=The create block|thumb]]<section end=image/>
<section begin=image/>[[File:Create Block.png|alt=The create block|thumb]]<section end=image/><p id="tooltip">Creates the specified number of agents of the selected breed.</p>
{{#vardefine:create|<code>create [_] [▼](s)</code>}}
 
<section begin=name/>'''<code>create [_] [▼](s)</code>'''<section end=name/> is a [[Special:MyLanguage/Code Block|code block]] part of the [[Special:MyLanguage/Agent|agents]] drawer.
{{#vardefine:create|<code>create [_] [▼](s)</code>}}<section begin=name/>'''<code>create [_] [▼](s)</code>'''<section end=name/> is a [[Special:MyLanguage/Code Block|code block]] part of the [[Special:MyLanguage/Agent|agents]] drawer.


==Usage==
==Usage==


<p id="tooltip"><code>create [_] [▼](s)</code> is used to populate [[Special:MyLanguage/Spaceland|Spaceland]] with [[Special:MyLanguage/Agent|agent]]s.</p>
<code>create [_] [▼](s)</code> is used to populate [[Special:MyLanguage/Spaceland|Spaceland]] with [[Special:MyLanguage/Agent|agent]]s.


==Syntax==
==Syntax==
Line 18: Line 18:
#a number in the socket
#a number in the socket
#a breed from the dropdown menu
#a breed from the dropdown menu
<br>


==Nuances==  
==Nuances==  

Revision as of 18:29, 8 August 2023

Other languages:
The create block

Creates the specified number of agents of the selected breed.

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

Usage

create [_] [▼](s) is used to populate Spaceland with agents.

Syntax

The Create Each Do Block

Inputs in this block:

  1. a number in the socket
  2. a breed from the dropdown menu

Nuances

An important difference between create [_] [▼](s) and create [_] [▼](s) each do is that create [_] [▼](s) each do allows a section of code to run individually for each agent that is created. create [_] [▼](s) only creates agents with the default traits in the center of Spaceland.

create [_] [▼](s) each do can be useful for randomizing traits and scattering agents without effecting others.

Related Blocks

Relevant Video Resources

Relevant Activities