On Collision With Do: Difference between revisions
(→Usage) |
No edit summary |
||
Line 1: | Line 1: | ||
<languages/> | |||
<translate> | |||
<section begin="image"/>[[File:On Collision With Do Block.png|alt=The on collision with do block|thumb]]<section end="image"/> | <section begin="image"/>[[File:On Collision With Do Block.png|alt=The on collision with do block|thumb]]<section end="image"/> | ||
<section begin="name" />'''{{Block|on collision with [▼] do}}'''<section end="name" /> is a code block from the [[Detection]] drawer. | <section begin="name" />'''{{Block|on collision with [▼] do}}'''<section end="name" /> is a code block from the [[Detection]] drawer. | ||
Line 16: | Line 19: | ||
[[Category:Detection]] | [[Category:Detection]] | ||
[[Category:Code Block]] | [[Category:Code Block]] | ||
</translate> |
Revision as of 14:05, 16 March 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
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.