On Collision With Do: Difference between revisions
m (Bolded name) |
(→Usage) |
||
Line 3: | Line 3: | ||
==Usage== | ==Usage== | ||
{{Block|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 {{Block|l|collidee}} block. | <p id="tooltip">{{Block|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 {{Block|l|collidee}} block.</p> | ||
===Syntax=== | ===Syntax=== |
Revision as of 18:54, 17 August 2022
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
on collision with [Dropdown: Type of Agent] do [code]
Nuances
on collision with [▼] do
cannot be used as a conditional such as if
. on collision with [▼] do
must begin a stack of code.