On Collision With Do: Difference between revisions

From StarLogo Nova Wiki
(Added)
(Added related blocks)
Line 10: Line 10:
==Nuances==
==Nuances==
{{Block|on collision with [▼] do}} cannot be used as a [[conditional]] such as {{Block|l|if}}. {{Block|on collision with [▼] do}} must begin a [[stack]] of code.
{{Block|on collision with [▼] do}} cannot be used as a [[conditional]] such as {{Block|l|if}}. {{Block|on collision with [▼] do}} must begin a [[stack]] of code.
==Related Blocks==
*{{Block|l|collidee}}


[[Category:Detection]]
[[Category:Detection]]
[[Category:Code Block]]
[[Category:Code Block]]

Revision as of 23:24, 9 August 2022

The on collision with do block

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.

Related Blocks