Contar a Distancia Pasos

From StarLogo Nova Wiki
This page is a translated version of the page Count Within Steps and the translation is 50% complete.
Outdated translations are marked like this.
Other languages:
The count within steps

contar [▼] a distancia [_] pasos is a bloque de código part of the detección drawer.

count [▼] within [_] steps is a code block part of the Detection drawer.

Usage

contar [▼] a distancia [_] pasos se utiliza para proporcionar el número de agentes de una raza seleccionada que existen dentro de un determinado paso límite en Spaceland.

Sintaxis

The Create Each Do Block

Entradas en este bloque:

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


Example

While the ‘mingle’ button is toggled on, agents with the color red are treated as having a disease and will spread that disease by sneezing. Agents proximal to the sneeze particles, as detected by the ‘count within’ block, will be more likely to contract the disease.

Common Uses

  • A common use of the contar [▼] a distancia [_] pasos block is to monitor the total population of agents of a select breed. To do this simply, El Mundo agent can be directed to count the number of agents within some region of Spaceland.

Para tener en cuenta

Bloques Relacionados