Jump to content




Melee turtle program


  • You cannot reply to this topic
2 replies to this topic

#1 Tin

  • New Members
  • 1 posts

Posted 08 June 2013 - 11:16 AM

I'm looking for a program for a melee turtle to make it attack for a limited time(for about 3 seconds)
and not forever.

#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 08 June 2013 - 02:19 PM

Split into new topic.

#3 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 08 June 2013 - 07:35 PM

The simple way:

for i=1,<somenumber> do
  turtle.attack()
  sleep(0.5)
end

The higher the number you put in place of "<somenumber>", the more times the loop will repeat and hence the longer the turtle will attack.





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users