Skip to main content

Collidee

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

Collidee block

Description

The Collidee block refers to the agent currently colliding with the "owner" of the block. This 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 an on collision with do stack of code. This block is used as a socket in other blocks, such as delete agent.

Syntax

This block has no inputs.

collidee

Example

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.

Collidee example code

Notes

Collidee only has significance when used inside a stack of code initialized by an on collision with do block.