Difference between revisions of "Turtle.place"
From ComputerCraft Wiki
m (Reverted edits by 93.174.93.145 (talk) to last revision by AfterLifeLochie) |
(Adding "see also".) |
||
(One intermediate revision by one other user not shown) | |||
Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=turtle.place | |name=turtle.place | ||
− | |args= | + | |args=[<nowiki/>{{type|string}} signText] |
|api=turtle | |api=turtle | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
− | |returns= | + | |returns={{type|boolean}} was the block placed? |
− | |desc=Places the selected block in front of the Turtle. | + | |desc=Places the selected block in front of the Turtle. If you're placing a sign and <var>signText</var> is given, then the turtle places the sign putting the text of <var>signText</var> into it. Each line of the sign can be separated using ''newline'' ("\n") character. |
|examples= | |examples= | ||
{{Example | {{Example | ||
|desc=Places the selected block in front of the Turtle. | |desc=Places the selected block in front of the Turtle. | ||
− | |code=turtle.place() | + | |code='''turtle.place()''' |
+ | }} | ||
+ | {{Example | ||
+ | |desc=Places a sign which says "Hello" in the first row, "and" in the second row and "Welcome!" in the third row. | ||
+ | |code= '''turtle.place("Hello\nand\nWelcome!")''' | ||
+ | |output=Places a sign which says "Hello and Welcome!" with each word separated into different lines. | ||
}} | }} | ||
}} | }} | ||
+ | |||
+ | ==See also== | ||
+ | *[[turtle.placeUp]] | ||
+ | *[[turtle.placeDown]] | ||
[[Category:Lua_Core_Functions]] | [[Category:Lua_Core_Functions]] |
Latest revision as of 18:02, 22 April 2015
Function turtle.place | |
Places the selected block in front of the Turtle. If you're placing a sign and signText is given, then the turtle places the sign putting the text of signText into it. Each line of the sign can be separated using newline ("\n") character. | |
Syntax | turtle.place([string signText]) |
Returns | boolean was the block placed? |
Part of | ComputerCraft |
API | turtle |
Examples
Example | |
Places the selected block in front of the Turtle. | |
Code |
turtle.place() |