Difference between revisions of "Turtle.place"
From ComputerCraft Wiki
m |
(Adding "see also".) |
||
| (10 intermediate revisions by 6 users 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 | ||
| − | |desc= | + | |returns={{type|boolean}} was the block placed? |
| + | |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 | + | |desc=Places the selected block in front of the Turtle. |
| − | |code= | + | |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]] | ||
Latest revision as of 18:02, 22 April 2015
| 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
| Places the selected block in front of the Turtle. | |
| Code |
turtle.place() |