Difference between revisions of "Turtle.suckUp"
From ComputerCraft Wiki
(Creating the article about this command. The source of the text is turtle.suck.) |
(Adding "see also" and correcting the name of the function.) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{lowercase}} | {{lowercase}} | ||
{{Function | {{Function | ||
− | |name=turtle.suck | + | |name=turtle.suck.Up |
|args=[<nowiki></nowiki>{{type|number}} amount] | |args=[<nowiki></nowiki>{{type|number}} amount] | ||
|returns={{type|boolean}} <var>true</var> if at least one item was moved into the turtle's inventory; <var>false</var> otherwise. | |returns={{type|boolean}} <var>true</var> if at least one item was moved into the turtle's inventory; <var>false</var> otherwise. | ||
Line 15: | Line 15: | ||
* As of ComputerCraft 1.6, if an amount is specified, the turtle will attempt to pick up at most the specified number of items. Earlier builds always attempt to pick up a full slot. | * As of ComputerCraft 1.6, if an amount is specified, the turtle will attempt to pick up at most the specified number of items. Earlier builds always attempt to pick up a full slot. | ||
|examples= | |examples= | ||
− | |||
− | |||
− | |||
− | |||
{{Example | {{Example | ||
|desc=Picks up some items from above the turtle. | |desc=Picks up some items from above the turtle. | ||
|code='''turtle.suckUp()''' | |code='''turtle.suckUp()''' | ||
− | |||
− | |||
− | |||
− | |||
}} | }} | ||
}} | }} | ||
+ | |||
+ | ==See also== | ||
+ | *[[turtle.suck]] | ||
+ | *[[turtle.suckDown]] | ||
[[Category:Lua_Core_Functions]] | [[Category:Lua_Core_Functions]] |
Latest revision as of 21:04, 21 April 2015
Function turtle.suck.Up | |
Moves one or more items from either the ground above the turtle, or, from an inventory-enabled block (such as a chest) above the turtle.
| |
Syntax | turtle.suck.Up([number amount]) |
Returns | boolean true if at least one item was moved into the turtle's inventory; false otherwise. |
Part of | ComputerCraft |
API | turtle |
Examples
Example | |
Picks up some items from above the turtle. | |
Code |
turtle.suckUp() |