On Collision With Do/es: Difference between revisions

From StarLogo Nova Wiki
No edit summary
(Updating to match new version of source page)
Line 17: Line 17:
#código relevante
#código relevante
<!-- <code>en colisión con [Dropdown: Type of Agent] do [code]</code> -->
<!-- <code>en colisión con [Dropdown: Type of Agent] do [code]</code> -->
<div lang="en" dir="ltr" class="mw-content-ltr">
==Example==
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
[[File:on_collision_with_do_example.gif|alt=On Collision With Do example gif|thumb]]
[[File:on_collision_with_do_example.png|alt=On Collision With Do example code|thumb]]
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
When the fish prey agents collides with the whale predator agent (i.e. they have the same x, y, and z coordinates) the prey agent deletes itself. This interaction makes it appear as if the predator eats the prey.
</div>


==Matices==
==Matices==

Revision as of 18:53, 11 August 2023

Other languages:
Al colisionar con hacer

al colisionar con [▼] hacer es un bloque de código del Detección cajón.

on collision with [▼] do is a code block from the Detection drawer.

Uso

en colisión con [▼] do comienza la ejecución de un pila de código cuando un collision se detecta con un tipo específico de agente indicado en el selector desplegable. El agente con el que colisionó se conoce como el "colisionado". Este agente puede ser referenciado usando elcollidee bloquear.

Sintaxis

The On Collision With Block

Entradas:

  1. una raza del menú desplegable
  2. código relevante

Example

When the fish prey agents collides with the whale predator agent (i.e. they have the same x, y, and z coordinates) the prey agent deletes itself. This interaction makes it appear as if the predator eats the prey.

Matices

En colisión con[▼] do no se puede usar como conditional como if. En colisión con [▼] do debe comenzar unstack de código.

Related Blocks