1 posts
Posted 17 February 2013 - 10:54 AM
Does Anyone Know how to make a GPS Turtle Bomber where i can go to a "server", type in a gps cord and then what slot to take the "bomb" from, i know that if you place a bomb below a turtle and tell it to red set the bottom it activates it, other than that i got no clue, thanks in advance for any help
8543 posts
Posted 17 February 2013 - 12:30 PM
Split into new topic.
451 posts
Location
The left part of this post
Posted 17 February 2013 - 12:49 PM
set a gps tower and then use this code
turtle:
rednet.open("right")
while true do
id, msg = rednet.receive()
if msg=="bomb" then
turtle.select(1)
turtle.place()
rs.setOutput("front", true)
sleep(1)
rs.setOutput("front", false)
elseif msg=="forward" then
turtle.forward()
elseif msg=="left" then
turtle.turnLeft()
elseif msg=="right" then
turtle.turnRight()
elseif msg=="up" then
turtle.up()
elseif msg=="pos" then
x, y, z = gps.locate()
rednet.send(id, x)
rednet.send(id, y)
rednet.send(id, z)
end
end
host:
print("x")
a = read()
print("y")
b = read()
rednet.open("top")
rednet.broadcast("pos")
id, x = rednet.receive()
id, y = rednet.receive()
id, z = rednet.receive()
for z, 254 do
rednet.send("up")
end
shell.run(goto, x, y, 254)
goto is a program to go to that cordinates