I made my first tier 3 robot and I gave it the same program that I gave to my other but i change the program so it will repeat if an object is still in front of it
i give it the same tool for mining like i always have a Diamond Drill from industrialcraft
but it just swing at the Block doing the little puff of smoke animation without breaking the block i even gave it a normal pick
I tried to pick it up and put it back down but it's the same thing I even restarted the world
in case it's my programming that is wrong here's my script
local robot = require("robot")local component = require("component")local g = component.generator
local x =0function dig()repeatif g.count()<10and robot.count(2)>1then
robot.select(2)
g.insert(1)
robot.select(1)endif robot.detectUp ==truethenrepeat
robot.swingUp()
os.sleep(1)until(robot.detectUp ==false)endif robot.detect ==truethenrepeat
robot.swing()
os.sleep(1)until(robot.detect ==false)end
robot.forward()if robot.detectDown()==falsethen
robot.placeDown()end
x = x +1until(robot.durability()==0or robot.count(robot.inventorySize())>0)
robot.turnAround()repeat
robot.swing()
robot.forward()
x = x -1until(x ==0)repeat
os.sleep(1)until(robot.durability()>0and robot.count(robot.inventorySize())==0)
robot.turnLeft()for i =0,2doif robot.detectUp ==truethenrepeat
robot.swingUp()
os.sleep(1)until(robot.detectUp ==false)endif robot.detect ==truethenrepeat
robot.swing()
os.sleep(1)until(robot.detect ==false)end
robot.forward()if robot.detectDown()==falsethen
robot.placeDown()endend
robot.turnLeft()endwhile(true)do
dig()end
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
I made my first tier 3 robot and I gave it the same program that I gave to my other but i change the program so it will repeat if an object is still in front of it
i give it the same tool for mining like i always have a Diamond Drill from industrialcraft
but it just swing at the Block doing the little puff of smoke animation without breaking the block i even gave it a normal pick
I tried to pick it up and put it back down but it's the same thing I even restarted the world
in case it's my programming that is wrong here's my script
Link to post
Share on other sites