Posted 24 June 2013 - 01:17 AM
I want to know if i'm able to tell a turtle where is its max y, like, "you can't go higher then y 64", please help me
local x,y,z
local function up()
if y<65 then
while not turtle.up() do end
y = y + 1
else
print ("Can't go any higher!")
end
end
-- Get GPS position here, store it in x/y/z.
-- From here on, use "up()" instead of "turtle.up()".
It's not that it's underused, it's that it's less well known. And why would Dan remove it? It's not causing any problems… That's like removing the colors API because you can use numbers instead.The gps api is really underused, I bet dan would remove it soon.
Definitely not! If he removed it, it would require people to be able to write an algorithm to calculate their own trilateration, something that people would not be able to do easily… it won't be removed!The gps api is really underused, I bet dan would remove it soon.
local bRunning = false
function run()
if bRunning then
error( "rednet is already running" )
end
bRunning = true
while bRunning do
local sEvent, sSide, sChannel, sReplyChannel, sMessage, nDistance = os.pullEventRaw( "modem_message" )
if sEvent == "modem_message" and isOpen( sSide ) and (sChannel == os.getComputerID() or sChannel == CHANNEL_BROADCAST) then
os.queueEvent( "rednet_message", sReplyChannel, sMessage, nDistance )
end
end
end