Crear

From StarLogo Nova Wiki
This page is a translated version of the page Create and the translation is 69% complete.
Outdated translations are marked like this.
Other languages:
The create block

crear [_] [▼](s) es un bloque de código parte de agentes código.

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

Uso

crear [_] [▼](s) se usa para poblar Spaceland con agentes.

Sintaxis

The Create Each Do Block

Entradas en este bloque:

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

Example

Create Example gif
Create Example code

When the setup button is pushed, The World first deletes all the agents, then uses the create block to to create 100 Turtles. Because the Turtles’ defaults have not been changed, they appear as white cubes of size 1. The Turtles also have the default location of (x= 0, y = 0, z = 0) when created, but then The World uses the scatter everyone block, which scatters the Turtles that now exist.

Para tener en cuenta

Una diferencia importante entre crear y crear [_] [▼](s) cada uno hacer es eso crear [_] [▼](s) cada uno hacer permite que una sección de código se ejecute individualmente para cada agente que se crea. Crear solo crea agentes con el valor predeterminado rasgos en el centro de Spaceland.

can be useful for randomizing traits and scattering agents without effecting others.

Bloques relacionados

Recursos en video relevantes

Actividades relevantes