Delete Everyone

From StarLogo Nova Wiki
Revision as of 15:27, 16 August 2023 by Admin (talk | contribs) (duplicate file already uploaded)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Other languages:
The Delete Everyone Block

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

delete everyone is a code block part of the agents drawer.

Usage

delete everyone is used to delete all agents from Spaceland.

Syntax

(in reference to every agent) delete everyone

Example

Delete Everyone example gif
Delete Everyone example code

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 replicate the behavior of a project loaded for the first time.

Nuances

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

Related Blocks