从列表中删除


描述

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.


动作语法:

Remove From List Syntax


参数:

参数 描述
列表 The index (stored in a variable) of the list to remove from
索引 The index within the list to remove


例如:

Remove From List Example
The 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.