3 posts
Posted 14 April 2013 - 10:33 PM
What a post to start my membership. There I was, upgrading my xp farm. I replace my melee turtle and type in the familiar command:
if true do
turtle.attack()
sleep(1)
end
Then low and behold, it does not attack. I tried running the API from lua and it just tells me false. I tried attackup and attack down. Ran all around it and even called it bad names, but still no luck.
Any help is appreciated
2447 posts
Posted 14 April 2013 - 10:47 PM
What is in front of it when attacking?
620 posts
Location
Holland
Posted 14 April 2013 - 10:48 PM
It is:
while true do
turtle.attack()
sleep(1)
end
Also you might want to decrease the sleep to like 0.5 or at max 0.05
1619 posts
Posted 15 April 2013 - 05:59 AM
It is:
while true do
turtle.attack
sleep(1)
end
Also you might want to decrease the sleep to like 0.5 or at max 0.05
You need parentheses after turtle.attack. .-.
620 posts
Location
Holland
Posted 15 April 2013 - 07:46 AM
It is:
while true do
turtle.attack
sleep(1)
end
Also you might want to decrease the sleep to like 0.5 or at max 0.05
You need parentheses after turtle.attack. .-.
Oops xD
3 posts
Posted 15 April 2013 - 07:48 AM
Whether I am in front of it or a mob is in front, it does not attack. I tried it with sleep not part of the program, I tried it with (1), (.1)(.2) and nothing changes as the turtle does not even initiate the attack. Attack, attackUp, and attackDown all show false when typed in lua.
2447 posts
Posted 15 April 2013 - 08:40 AM
Are you in creative mode or survival? Is the mob directly adjacent? What version of CC?
3 posts
Posted 15 April 2013 - 10:43 AM
*facepalm* I am in survival mode, however the issue was I kept on putting "if true do" instead of "while true do". This can be chalked up to a newb getting confused with coding :-\