> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://documentation.celestory.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# 🟦 Remove from list

# 🟦 Remove from list

${frame}[Video: anatomy of the Remove from list block](https://celestory-docs-videos.netlify.app/en/anatomie-bloc/removefromlist.html)

![Remove from list](https://celestory-docs-illustrations.netlify.app/en/Removefromlist_EN.svg)

The Delete from list block allows you to remove a specific element from a List (Array) type variable. It is essential for managing inventories, shopping carts, task lists or groups of dynamic entities.

This block is particularly useful for reflecting actions like consuming an item, removing a completed mission, or disappearing a defeated enemy.

## 📥 Entries

- variable (List variable): The list variable from which an element must be deleted.
- index (Number, default 1): The position of the element to remove from the list, counting from 1 (1 = the first element of the list).

## 📤 Outings

- out (Stream): An instantaneous signal confirming the deletion of the element, allowing updates to be triggered or the logical flow to continue.

## 💡 Example of use

Scenario: Remove a defeated enemy from a target list

1. The player faces a group of enemies represented by the Active_Enemies List variable: ["Goblin", "Orc", "Troll"].
1. After defeating the Orc, the system finds its position in the list: it's the 2nd element.
1. The Delete from list block is called with:

- list = Active_Enemies
- index = 2 (2nd element of the list, the Orc)

1. The list is instantly updated to ["Goblin", "Troll"].
1. The exit flow triggers a victory animation and updates the player interface.

## ⚙️ Technical Details

- Duplicate management: The index targets exactly one element by its position, even if several elements in the list share the same value.
- Robustness: The index field is automatically clamped between 1 and the size of the list. A value that's too high or too low won't cause an error, but it may delete a different element than intended (the first or last one in the list): always double-check that the index matches the position you mean to target.
- Performance: The operation rebuilds the list, so it takes a time proportional to the number of elements it contains (the longer the list, the longer the operation).

---

*Documented version: v1*