When Turtles Attack

h0gtitties

New Member
Jul 29, 2019
42
0
0
Hi all, I know this is a little bit old but I am having the same or similar problem. It seems so simple yet I must not be doing something right. Here are my steps:

1. Place Melee Turtle
2. Right click to enter terminal
3. at prompt typed "edit startup"
4. Added code:
Code:
while true do
  turtle.attack()
  sleep(1)
end
5. ctrl to save
6. ctrl to exit
7. typed "reboot" also tried using ctrl+r to reboot
8. computer reboots and displays "TurtleOS 1.5" in terminal.
9. Jump in front of turtle... and nothing...

Did I miss a step?
 

Silent_007

New Member
Jul 29, 2019
302
0
0
This. ^^^

Or maybe you're not close enough? Their attack range is less than a player's would be I believe...
 

Silent_007

New Member
Jul 29, 2019
302
0
0
Sounds like a bug of some sort to me... (which I'm terrible at fixing).
Which modpack and version are you using? This won't tell me anything, but may enable someone else to help you.

Have you tried relaunching Minecraft already?
Maybe redownload the modpack? (Back up your world saves!!)
 

ttech

New Member
Jul 29, 2019
35
0
0
Mine are doing the same thing. Are they not supposed to attack their creator anymore?
 

voidreality

New Member
Jul 29, 2019
117
0
0
What pack (or version of ComputerCraft) are you guys using? I just tested my turtles using the lastest DW20 pack and my turtles still attack me.
 

voidreality

New Member
Jul 29, 2019
117
0
0
Just tested in Ultimate 1.0.1. Turtles still attack their owners (for about half health with no armor). I'm not sure why it's not working for some. Maybe a config setting? Do you have armor on that is preventing the damage? I'm using a diamond sword melee turtle (not sure if this matters, but that was my test)

Here is my exact test, each step.

1. Place the melee turtle down.
2. Right click the turtle.
3. type "edit attack" into the turtle.
4. type the following code into the turtle.
Code:
while true do
turtle.attack()
sleep(.5)
end
5. press ctrl
6. press enter (selecting save)
7. press ctrl
8. arrow over to "exit"
9. press enter (selecting exit)
10. type "attack" into the turtle.
11. run in front of the turtle to test it.
 

Moezso

New Member
Jul 29, 2019
312
0
0
Ok, what would I add to this
Code:
while true do
  turtle.attack()
  turtle.dropDown()
  sleep(1)
end
to make it drop slots 2 & 3 as well? Need to put bones, arrows & occasionally bows into an enderchest.
 

voidreality

New Member
Jul 29, 2019
117
0
0
This will check all 16 slots for items and drop them down if needed.

Code:
while true do
turtle.attack()
for i=1,16 do
  if turtle.getItemCount(i) > 0 then
   turtle.select(i)
   turtle.dropDown()
  end
end
sleep(1)
end
 
  • Like
Reactions: Moezso

Moezso

New Member
Jul 29, 2019
312
0
0
This will check all 16 slots for items and drop them down if needed.

Code:
while true do
turtle.attack()
for i=1,16 do
  if turtle.getItemCount(i) > 0 then
  turtle.select(i)
  turtle.dropDown()
  end
end
sleep(1)
end
Thanks, so far as I can see it works like a champ. And it's simple enough that I see why it works.