Difference between revisions of "Turtle.drop"
From ComputerCraft Wiki
| Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=turtle.drop | |name=turtle.drop | ||
| − | |args= | + | |args=count |
| + | |returns=true if an item was dropped; false otherwise. | ||
|api=turtle | |api=turtle | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
| − | |desc=Drops all items in the | + | |desc=Drops all items in the selected slot, or if [count] is specified, drops that many items. |
| + | If the space in front of the turtle does not contain a chest, the items are dropped into that space. | ||
| + | If the space in front of the turtle contains a chest, the items are dropped into that chest. | ||
| + | The items will be placed in the first available slot, starting at the top left, moving right and then down. | ||
| + | |||
|examples= | |examples= | ||
{{Example | {{Example | ||
| − | |desc=Drops all items in the first available slot | + | |desc=Drops all items in the first available slot. |
|code=turtle.drop() | |code=turtle.drop() | ||
}} | }} | ||
}} | }} | ||
| − | |||
Revision as of 00:52, 10 August 2012
| Drops all items in the selected slot, or if [count] is specified, drops that many items.
If the space in front of the turtle does not contain a chest, the items are dropped into that space. If the space in front of the turtle contains a chest, the items are dropped into that chest. The items will be placed in the first available slot, starting at the top left, moving right and then down. | |
| Syntax | turtle.drop(count) |
| Returns | true if an item was dropped; false otherwise. |
| Part of | ComputerCraft |
| API | turtle |
Examples
| Drops all items in the first available slot. | |
| Code |
turtle.drop() |