commands.getBlockPosition
Return the location of the running Command Computer.
|
|||
Get the Position of the Computer and print it | |||
Code | <nowiki>
local x, y, z = commands.getBlockPosition()
print("X:"..x.." Y:"..y.." Z:"..z)
</nowiki>
|
||
Output | X:10 Y:100 Z:50
|
Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Lua |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CC:Tweaked |
|
commands.getBlockPosition Function | |
---|---|
Syntax commands.getBlockPosition() | |
Returns | number x number y number z |
API | commands |
Source | CC:Tweaked (source) |
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.