Remove From List Icon Remove From List

This action can be used to remove an index item from the given list. You supply the variable that stores the list index (as returned by the action Create List) and the index position within the list to remove, where the index position is between 1 and (list length -1). This action does not return anything so if you need the value at the index position you should use Get List Item At before removing the index.

 

Action Syntax:

Remove From List Action

Arguments:

ArgumentDescription
ListThe index (stored in a variable) of the list to remove from
IndexThe index within the list to remove

 

Example:

Remove From List ExampleThe above action block code checks for a collision at the instance position and if one is found the unique ID value for the instance is stored in a temporary variable and then checked to see if it exists within the list data structure. If it does exist then the item is removed from the list and the instance destroyed.