Collidee: Difference between revisions

From StarLogo Nova Wiki
No edit summary
mNo edit summary
 
(8 intermediate revisions by the same user not shown)
Line 2: Line 2:
<translate>
<translate>


<!--T:1-->
[[Category:Detection]]
[[Category:Detection]]
<section begin="image"/>[[File:Collidee Block.png|alt=The collidee block|thumb]]<section end="image"/>
<section begin="image"/>[[File:Collidee Block.png|alt=The collidee block|thumb]]<section end="image"/><p id="tooltip">Refers to the agent currently colliding with the "owner" of the block. (Only works inside an on collision with block)</p>
 
<!--T:8-->
<section begin="name" />'''{{Block|collidee}}'''<section end="name" /> is a [[code block]] part of the [[Detection]] drawer.
<section begin="name" />'''{{Block|collidee}}'''<section end="name" /> is a [[code block]] part of the [[Detection]] drawer.
<!--T:7-->
==Usage==
==Usage==
<p id="tooltip">{{Block|collidee}} is used to refer to the [[agent]] that has been collided with when used inside a {{Block|On Collision With Do|on collision with [▼] do}} [[stack]] of code.
{{Block|collidee}} is used to refer to the [[agent]] that has been collided with when used inside a {{Block|On Collision With Do|on collision with [▼] do}} [[stack]] of code.
This block is used as a [[socket]] in other blocks, such as <code>[[Delete Agent|delete agent [_]]]</code>.</p>
This block is used as a [[socket]] in other blocks, such as <code>[[Delete Agent|delete agent [_]]]</code>.


===Syntax===
<!--T:2-->
==Syntax==
<code>collidee</code>
<code>collidee</code>


==Example== <!--T:9-->
<!--T:10-->
[[File:collidee_example.gif|alt=Collidee example gif|thumb]]
[[File:collidee_example_code.png|alt=Collidee example code|thumb]]
<!--T:11-->
When a predator agent collides with a prey agent (i.e. they have the same x, y, and z coordinates) the predator deletes the prey agent.  This interaction makes it appear as if the predator eats the prey.
<!--T:3-->
==Nuances==
==Nuances==
{{Block|collidee}} only has significance when used inside a [[stack]] of code initialized by a {{Block|On Collision With Do|on collision with [▼] do}} block.
{{Block|collidee}} only has significance when used inside a [[stack]] of code initialized by a {{Block|On Collision With Do|on collision with [▼] do}} block.


<!--T:4-->
==Related Blocks==
==Related Blocks==
*{{Block|On Collision With Do|on collision with [▼] do}}
*{{Block|On Collision With Do|on collision with [▼] do}}


<!--T:5-->
==Relevant Activities==
==Relevant Activities==
[[Category:Code Block]]
[[Category:Code Block]]
</translate>
</translate>

Latest revision as of 13:36, 15 August 2023

Other languages:
The collidee block

Refers to the agent currently colliding with the "owner" of the block. (Only works inside an on collision with block)

collidee is a code block part of the Detection drawer.

Usage

collidee is used to refer to the agent that has been collided with when used inside a on collision with [▼] do stack of code. This block is used as a socket in other blocks, such as delete agent [_].

Syntax

collidee

Example

Collidee example gif
Collidee example code

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

Nuances

collidee only has significance when used inside a stack of code initialized by a on collision with [▼] do block.

Related Blocks

Relevant Activities