Skip to main content

Delete Everyone

Deletes everyone including itself. *The World cannot delete itself.

Delete Everyone block

Description​

The Delete Everyone block removes all agents from Spaceland. When executed, it deletes every agent in the simulation, including the agent that runs the block itself. The only exception is The World, which cannot delete itself.

Usage​

Delete Everyone is used to delete all agents from Spaceland.

Syntax​

This block has no inputs.

Example​

Each time that setup is pressed, The World deletes all other agents. This ensures that each time a new set of agents is created, the population does not continue to increase. Using the delete everyone block enables the 'setup' button to replicate the behavior of a project loaded for the first time.

Delete Everyone example code

Notes​

Code may be placed after this block as this block can be used to delete all agents under the world tab.

  • Delete - Deletes the agent executing the code
  • Delete Agent - Deletes a specific agent by reference