commands.getBlockPosition

Return the location of the running Command Computer.

ExampleGet the Position
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

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.