π¦ List includes
π¦ List includes
The List contains block allows you to check if a specific element (text, number or boolean) is present in a given list.
This block is particularly useful for conditional checks, such as the presence of an object in an inventory or a value in a data collection.
π₯ Entries
- list (List of Values): The list in which to search for the element.
- value (Text, Number or Boolean): The element to search for in the list (its type depends on the content of the list).
π€ Outings
- value (Boolean): Returns
Trueif the element is present in the list,Falseotherwise. This output can be connected to a conditional block (If/Else) to trigger actions accordingly.
π‘ Example of use
Scenario: Checking an item in the player's inventory
- The player has an
Itemslist containing["Key", "Potion", "Sword"]. - The game must check if the player has the
Keyto open a door. - The List contains block is configured with
list = Objectsandvalue = "Key". - The
valueoutput returnsTrue, indicating that theKeyis indeed in the inventory. - A Condition block uses this result to authorize the opening of the door.
βοΈ Technical Details
- Behavior: This block does not modify the flow of the scenario but evaluates a condition. It has no stream input or output (
in/out), only data input/output. - Type management: The type of the
valueentry automatically adapts to the content of the list (eg:Textfor a list of strings,Numberfor a list of numeric values).
Updated on: 04/03/2026
Thank you!
