Collidee

From StarLogo Nova Wiki
Revision as of 13:36, 15 August 2023 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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