delete () of ()

From PenguinMod Wiki
Delete () of ()
Jump to navigation Jump to search
delete () of ()
delete (1) of [list v]
Caption
Block Type Stack Block
Category / Extension Lists
Status Who tf uses status

The delete () of () block is a stack block in the Lists subcategory that deletes a specified item in a list. It originates from Scratch.

Hidden Features

The delete () of () has the ability to delete all items, the last item, or a random item due to "all" and "last" being options in the delete block, as well as "last" and "random" being options in other list blocks. The dropdown options were removed in Scratch 3.0, but the options are still functional, and can be accessed by using a reporter block that reports all/last/random, uploading a project with the block, or copy and pasting the text into the dropdown. The all option was replaced with the delete all of () block in 3.0.

Workaround

All

The all option can be worked around by using the block that replaced it, or by deleting every item in the list until it is empty:
delete all of [list v]

Last

The last option can be worked around by using the length of () Lists reporter block as the input for the number:
delete (length of [list v]) of [list v]

Random

Random can be worked around by generating a number for any item in the list using the pick random () to () block:
delete (pick random (1) to (length of [list v])) of [list v]