Create Each Do/es: Difference between revisions

From StarLogo Nova Wiki
(Updating to match new version of source page)
(Updating to match new version of source page)
 
(34 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
[[Category: Agentes]]
<section begin=image/>[[File:CreateEachDo.png|alt=Crear Cada uno hacer bloquear|thumb]]<section end=image/>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
[[Category: Agents]]
The created agents have the default shape, color, and size specified in their breed’s ‘Show Traits’ area. They are created in the middle of the terrain, on the ground (x=0, y=0, z=0), with their headings evenly distributed, starting at 0 degrees (e.g. if 4 are created, one will start out facing toward each of the 4 sides of spaceland.) The turtles then follow the instructions provided within the each do hook once.
<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.
</div>
</div>
<section begin="name" />'''<code>crear [_] [_▼](s) cada uno hacer</code>'''<section end="name" /> es un [[bloque de código]] parte de [[Special:MyLanguage/agents|agentes]] cajón.
== Uso==
<code>crear[_] [▼](s) cada uno hacer </code> se usa para poblar [[Spaceland]] con [[Special:MyLanguage/Agents|agente]]s y luego ejecutar un [[stack]] de código individualmente para cada agente. Esto puede ser útil para crear muchos agentes y configurar diferentes [[rasgos]] para cada.
==Sintaxis==
[[File:CED Nums ES.png|right|alt=The Create Each Do Block|thumb]]
<!-- <code>crear [Textbox: Number of Agents to Create] [Dropdown: Type of Agent](s) each do [code]</code> -->
Entradas en este bloque:
#un número en el zócalo
#una raza del menú desplegable
#código relevante


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
== Usage==
==Example==
<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.
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
===Syntax===
[[File:create_each_do_example.gif|alt=Create Each Do example gif|thumb]]
<code>create [Textbox: Number of Agents to Create] [Dropdown: Type of Agent](s) each do [code]</code>
[[File:create_each_do_example.png|alt=Create Each Do example code|thumb]]
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
==Nuances==
When setup is pushed, The World creates 100 turtles, and each of those turtles follow the instructions within the “each do” block.  In this example, each turtle takes on a random color and moves to a random position in spaceland. All turtles are created, change color, and relocate in one tick of the StarLogo clock.
<code>create [_] [▼](s) each do</code> is very similar to <code>[[create|create [_] [▼](s)]]</code>. Both create agents, but generally <code>create [_] [▼](s) each do</code> allows for more complex and powerful usages.
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
==Para tener en cuenta==
==Related Blocks==
<code>crear [_] [▼](s) cada uno hacer</code> es muy similar a <code>[[Special:MyLanguage/create|crear [_] [▼](s)]]</code>. Ambos comandos crean agentes, pero generalmente <code>crear [_] [▼](s) cada uno hacer</code> permite usos más complejos y potentes.
*<code>[[create|create [_] [▼](s)]]</code>
 
</div>
==Bloques relacionados==
*<code>[[create|crear [_] [▼](s)]]</code>


<div lang="en" dir="ltr" class="mw-content-ltr">
<span id="Relevant_Video_Resources"></span>
==Relevant Video Resources==
==Recursos en video relevantes==
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<span id="Relevant_Activities"></span>
==Relevant Activities==
==Actividades relevantes==
</div>

Latest revision as of 18:18, 11 August 2023

Other languages:
Crear Cada uno hacer bloquear

The created agents have the default shape, color, and size specified in their breed’s ‘Show Traits’ area. They are created in the middle of the terrain, on the ground (x=0, y=0, z=0), with their headings evenly distributed, starting at 0 degrees (e.g. if 4 are created, one will start out facing toward each of the 4 sides of spaceland.) The turtles then follow the instructions provided within the each do hook once.

crear [_] [_▼](s) cada uno hacer es un bloque de código parte de agentes cajón.

Uso

crear[_] [▼](s) cada uno hacer se usa para poblar Spaceland con agentes y luego ejecutar un stack de código individualmente para cada agente. Esto puede ser útil para crear muchos agentes y configurar diferentes rasgos para cada.

Sintaxis

The Create Each Do Block


Entradas en este bloque:

  1. un número en el zócalo
  2. una raza del menú desplegable
  3. código relevante

Example

Create Each Do example gif
Create Each Do example code

When setup is pushed, The World creates 100 turtles, and each of those turtles follow the instructions within the “each do” block. In this example, each turtle takes on a random color and moves to a random position in spaceland. All turtles are created, change color, and relocate in one tick of the StarLogo clock.

Para tener en cuenta

crear [_] [▼](s) cada uno hacer es muy similar a crear [_] [▼](s). Ambos comandos crean agentes, pero generalmente crear [_] [▼](s) cada uno hacer permite usos más complejos y potentes.

Bloques relacionados

Recursos en video relevantes

Actividades relevantes