Difference between revisions of "Commands.getBlockPosition"
From ComputerCraft Wiki
MKlegoman357 (Talk | contribs) (Created page with "{{lowercase}} {{Function |name=commands.getBlockPosition |args= |returns={{type|number}} x, {{type|number}} y, {{type|number}} z |api=commands |addon=ComputerCraft |desc=Avail...") |
Smiley43210 (Talk | contribs) m (Changed "MineCraft" to "Minecraft") |
||
| Line 6: | Line 6: | ||
|api=commands | |api=commands | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
| − | |desc=Available only to [[Command Computer]]s, returns the | + | |desc=Available only to [[Command Computer]]s, returns the Minecraft world co-ordinates of the computer running the command. |
|examples= | |examples= | ||
{{Example | {{Example | ||
Latest revision as of 12:14, 14 August 2015
| Available only to Command Computers, returns the Minecraft world co-ordinates of the computer running the command. | |
| Syntax | commands.getBlockPosition() |
| Returns | number x, number y, number z |
| Part of | ComputerCraft |
| API | commands |
Examples
| Prints the coordinates of the Command Computer running the function. | |
| Code |
local x, y, z = commands.getBlockPosition() print( "Command Computer's position:" ) print("X: ", x) print("Y: ", y) print("Z: ", z) |
| |
|---|
| commands.exec - commands.execAsync - commands.list - commands.getBlockPosition - commands.getBlockInfo - commands.getBlockInfos |