On Collision With Do: Difference between revisions
No edit summary |
No edit summary |
||
Line 13: | Line 13: | ||
==Syntax== | ==Syntax== | ||
<section begin=image/>[[File:On Collision With Do Nums.png|right|alt=On Collision With Do|thumb]]<section end=image/> | <section begin=image/>[[File:On Collision With Do Nums.png|right|alt=On Collision With Do|thumb]]<section end=image/> | ||
<code>on collision with [Dropdown: Type of Agent] do [code]</code> | <!-- <code>on collision with [Dropdown: Type of Agent] do [code]</code> --> | ||
Inputs: | |||
#a breed from the dropdown menu | |||
<!--T:4--> | <!--T:4--> |
Revision as of 15:52, 21 July 2023
on collision with [▼] do
is a code block from the Detection drawer.
Usage
on collision with [▼] do
begins the execution of a stack of code when a collision is detected with a specific type of agent denoted in the drop down selector. The agent collided with is known as the "collidee". This agent can be referenced using the collidee
block.
Syntax
Inputs:
- a breed from the dropdown menu
Nuances
on collision with [▼] do
cannot be used as a conditional such as if
. on collision with [▼] do
must begin a stack of code.