Crear Cada Uno Hacer

From StarLogo Nova Wiki
This page is a translated version of the page Create Each Do and the translation is 71% complete.
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