Crear
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
Entradas en este bloque:
- un número en el zócalo
- una raza del menú desplegable
Example
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