Jump to content




Possible to add to the Turtle OS functions?


  • You cannot reply to this topic
1 reply to this topic

#1 Ampix0

  • Members
  • 21 posts

Posted 12 May 2013 - 12:32 AM

I have written some functions for the turtle I will use for basically every single bot I write, they just make the default API a little smarter and the actions more robust. I know some of you guys have made your own OS for the computers (which I have no idea how to do). Can it be done for a Turtle? Can someone show me a tutorial for this?

#2 KaoS

    Diabolical Coder

  • Members
  • 1,510 posts
  • LocationThat dark shadow under your bed...

Posted 12 May 2013 - 07:47 AM

basically modify the turtle functions in your startup file...

for example
local fd=turtle.forward
turtle.forward=function(num)
  num=tonumber(num) or 1
  for i=1,num do
    if not fd() then
	  return false,i
    else
	  --modify position recording
    end
  end
end






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users