I have a slight problem with my melee turtles. I started with the usual "while true do ..attack.. end" loop and that works fine. What I would like to implement next is a detectDown() into the mix. Yeah, overly complicated but hey, easy is meh.
Code atm looks like this:
Code:while turtle.detectDown() do while turtle.attack() do print ("Block present.") turtle.attack() end end
It is printing the "Block present" message - but even though it has a zombie right in front of it, it is not attacking. I'm obviously doing something very wrong. Hooray for the lua-nub. Please, a pointer (pun not intended) into the right direction?
New to this LUA also, have you tried a sleep(.1) after turtle.attack()
I am using something similar but mine has the sleep line in it which I think makes it start the code again from the start. But keep working in a loop so its not just trying to attack once.