Jump to content




Turtle Tree Farmer Movement API

api turtle

3 replies to this topic

#1 Luanub

    Lua Nub

  • Members
  • 1,135 posts
  • LocationPortland OR

Posted 20 March 2012 - 11:04 AM

The Turtle Control System API improves on the Default Turtle API to make the movements more intelligent and allow the user to specify the number blocks the turtle is to move.

The Turtle will destroy any block that gets in its path. Additionally if a mob or player steps in front of the Turtle it will stop and wait until its path is clear before it proceeds. This ensures that your turtle will follow the correct path and place items with accuracy.

There is also a function to harvest tree's and prep the specified area for planting.

Hopefully this will save some time and simple your coding some.

To install download the file from below and for SSP save the file to your %APPDATA%/.minecraft/mods/ComputerrCraft/lua/rom/apis/turtle folder.

For SMP save the file to your minecraftserver/mods/ComputerCraft/lua/rom/apis/turtle folder.

Alternatively you can save the file in your computers root directory and us os.loadAPI("TCS") in the start of your program to load the API manually. To unload the API simply use os.unloadAPI("TCS").

Functions:
Spoiler

Video:
Spoiler

Download: TCS

Edited by luanub, 17 April 2012 - 01:11 AM.


#2 Chriswil1451021

  • New Members
  • 1 posts

Posted 16 April 2012 - 09:48 AM

I put the file where you said to but for some reason i keep getting this error when i type the TCS.forward(1)

lua:1: attempt to index ? (a nil value)

And the rest does the same

can you please explain how to install and use better so that i might be abele to understand it?

#3 Luanub

    Lua Nub

  • Members
  • 1,135 posts
  • LocationPortland OR

Posted 17 April 2012 - 01:14 AM

I've updated the instruction and included the file as a download vs source coding to hopefully make that portion easier.

Make sure the API is loaded before trying your program by typing apis from the terminal. If it is not try to manually load it.

Also make sure the file is named TCS, if it is not you will have to use whatever you named the file to call the function. example: filename.forward(1)

If it is loaded and named as TCS, TCS.forward(1) should work. From the error it sounds like the API is more then likely not loaded. If you have further issues let me know and I'll see what I can do to help.

#4 Zee

  • Members
  • 42 posts
  • LocationIndiana

Posted 18 July 2013 - 10:39 PM

Hey. Would you mind if I used this in my OS when i edit it for turtles? I'll provide proper credit.

Edit: I am a master post necro-er now. *le fail*





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users