This article is also available in:

🟦 Remove from list

🟦 Remove from list


Remove from list


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


  • list (List/Array): The collection of data 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


  • 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"].
  2. After defeating the Orc, the system finds its position in the list: it's the 2nd element.
  3. 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"].
  2. 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

Updated on: 06/09/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!