Difference between revisions of "Turtle.suck"
From ComputerCraft Wiki
Bomb Bloke (Talk | contribs) (As of CC 1.6, can now specify an amount to suck.) |
MKlegoman357 (Talk | contribs) m (Fixed up some formatting) |
||
Line 3: | Line 3: | ||
|name=turtle.suck | |name=turtle.suck | ||
|args=[<nowiki></nowiki>{{type|number}} amount] | |args=[<nowiki></nowiki>{{type|number}} amount] | ||
− | |returns= | + | |returns={{type|boolean}} <var>true</var> if at least one item was moved into the turtle's inventory; <var>false</var> otherwise. |
|api=turtle | |api=turtle | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
Line 17: | Line 17: | ||
{{Example | {{Example | ||
|desc=Picks up some items from in front of the turtle. | |desc=Picks up some items from in front of the turtle. | ||
− | |code=turtle.suck() | + | |code='''turtle.suck()''' |
}} | }} | ||
{{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()''' |
}} | }} | ||
{{Example | {{Example | ||
|desc=Picks up some items from below the turtle. | |desc=Picks up some items from below the turtle. | ||
− | |code=turtle.suckDown() | + | |code='''turtle.suckDown()''' |
}} | }} | ||
}} | }} | ||
[[Category:Lua_Core_Functions]] | [[Category:Lua_Core_Functions]] |
Revision as of 14:58, 16 August 2014
Function turtle.suck | |
Moves one or more items from either the ground in front of the turtle, or, from an inventory-enabled block (such as a chest) in front of the turtle.
| |
Syntax | turtle.suck([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 in front of the turtle. | |
Code |
turtle.suck() |
Example | |
Picks up some items from above the turtle. | |
Code |
turtle.suckUp() |
Example | |
Picks up some items from below the turtle. | |
Code |
turtle.suckDown() |