Delete: Difference between revisions
(Marked this version for translation) |
(same file already uploaded) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 13: | Line 13: | ||
<!--T:19--> | <!--T:19--> | ||
Deletes the [[agent]] executing the [[stack]] of code. | Deletes the [[agent]] executing the [[stack]] of code. | ||
==Example== <!--T:26--> | |||
<!--T:27--> | |||
[[File:collidee_example.gif|alt=Delete example gif|thumb]] | |||
[[File:delete_example.png|alt=Delete example code|thumb]] | |||
<!--T:28--> | |||
When a prey agent collides with a predator agent (i.e. they have the same x, y, and z coordinates) the prey agent deletes itself. This interaction makes it appear as if the predator eats the prey. | |||
<!--T:20--> | <!--T:20--> |
Latest revision as of 15:25, 16 August 2023
Deletes itself.
delete
is a code block part of the agents drawer.
Usage
Deletes the agent executing the stack of code.
Example
When a prey agent collides with a predator agent (i.e. they have the same x, y, and z coordinates) the prey agent deletes itself. This interaction makes it appear as if the predator eats the prey.
Nuances
delete
does not delete all agents of a type. delete
deletes only the single agent that runs the block. See related blocks for other code blocks with similar delete functions.
No code may be placed underneath the delete block as there will be no agent available to run the code.