On Collision With Do/es: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 12: | Line 12: | ||
==Sintaxis== | ==Sintaxis== | ||
[[File:On Collision With Do Nums Es.png|right|alt=The On Collision With Block|thumb]] | |||
Entradas: | Entradas: | ||
#una raza del menú desplegable | #una raza del menú desplegable | ||
#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:collidee_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== |
Latest revision as of 15:35, 16 August 2023
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
Entradas:
- una raza del menú desplegable
- 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.