Delete Agent: Difference between revisions
No edit summary |
(Marked this version for translation) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
<!--T:10--> | <!--T:10--> | ||
[[Category:Agents]] | [[Category:Agents]] | ||
<section begin="image" />[[File:Delete Agent.png|alt=The delete agent block|thumb]]<section end="image"/> | <section begin="image" />[[File:Delete Agent.png|alt=The delete agent block|thumb]]<section end="image"/><p id="tooltip">Deletes the specified agent (use "collidee", "nearest", or "my parent" blocks).</p> | ||
<!--T: | <!--T:18--> | ||
<section begin="name" /> | <section begin="name" />'''<code>delete agent [_]</code>'''<section end="name" /> is a [[Special:MyLanguage/Code Block|code block]] part of the [[Special:MyLanguage/Agent|agents]] drawer. | ||
'''<code>delete agent [_]</code>'''<section end="name" /> is a [[Special:MyLanguage/Code Block|code block]] part of the [[Special:MyLanguage/Agent|agents]] drawer. | |||
==Usage== <!--T:12--> | ==Usage== <!--T:12--> | ||
Line 15: | Line 13: | ||
<code>delete agent [_]</code> is used to delete a specific [[Special:MyLanguage/Agent|agent]] from [[Special:MyLanguage/Spaceland|Spaceland]]. | <code>delete agent [_]</code> is used to delete a specific [[Special:MyLanguage/Agent|agent]] from [[Special:MyLanguage/Spaceland|Spaceland]]. | ||
<!--T:14--> | |||
==Syntax== | |||
[[File:Delete Agent Nums.png|right|alt=The Create Each Do Block|thumb]] | |||
Inputs in this block: | Inputs in this block: | ||
#block that represents an agent (e.g. me, my parent or nearest) | #block that represents an agent (e.g. me, my parent or nearest) | ||
Line 22: | Line 21: | ||
<!--T:15--> | <!--T:15--> | ||
<code>delete agent [Special: Agent Reference]</code> | <code>delete agent [Special: Agent Reference]</code> | ||
==Example== <!--T:19--> | |||
<!--T:20--> | |||
[[File:delete_agent_example.gif|alt=Delete Agent example gif|thumb]] | |||
[[File:delete_agent_example.png|alt=Delete Agent example code|thumb]] | |||
<!--T:21--> | |||
When a red block collides with a blue block, from the red block’s perspective the blue block is the collidee. Following a collision, the delete agent block allows for the red block to delete the blue block. This organization mirrors the physical behavior of how the predator eats the prey. | |||
<!--T:16--> | <!--T:16--> | ||
Line 28: | Line 36: | ||
*<code>[[Special:MyLanguage/Delete Everyone|delete everyone]]</code> | *<code>[[Special:MyLanguage/Delete Everyone|delete everyone]]</code> | ||
</translate> | </translate> | ||
<strong>Note:</strong> Using the me block inside delete agent will produce the same behavior as using the delete block, which makes any agent following the instructions delete itself. |
Latest revision as of 18:10, 11 August 2023
Deletes the specified agent (use "collidee", "nearest", or "my parent" blocks).
delete agent [_]
is a code block part of the agents drawer.
Usage
delete agent [_]
is used to delete a specific agent from Spaceland.
Syntax
Inputs in this block:
- block that represents an agent (e.g. me, my parent or nearest)
delete agent [Special: Agent Reference]
Example
When a red block collides with a blue block, from the red block’s perspective the blue block is the collidee. Following a collision, the delete agent block allows for the red block to delete the blue block. This organization mirrors the physical behavior of how the predator eats the prey.
Related Blocks
Note: Using the me block inside delete agent will produce the same behavior as using the delete block, which makes any agent following the instructions delete itself.