This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Astrognome's profile picture

[1.3] Things I would like to see in turtles

Started by Astrognome, 06 March 2012 - 03:23 PM
Astrognome #1
Posted 06 March 2012 - 04:23 PM
turtle.setPos(x,y,z) - would set the relative position of the turtle. This would be saved on a per-turtle basis, and would be persistent, and would be affected by the movements of the turtle.

turtle.getPos("x/y/z") - returns coordinates base on what axis you give it.

turtle.examine("front/back/left/right/up/down") - returns block type, if no type available, then return ID. Require some sort of eye attachment?

turtle.detectLeft() - Self explanatory. good for pathfinding so you don't have to turn every block to see if there's something next to it.

turtle.detectRight() - see above
Liraal #2
Posted 06 March 2012 - 05:57 PM
well, there are APIs that do just that (maybe except for the examining) but they all give relative coords and requite user input for actual ones. casper hinted that there may be a way to locate them in 1.31 though
Astrognome #3
Posted 06 March 2012 - 06:28 PM
well, there are APIs that do just that (maybe except for the examining) but they all give relative coords and requite user input for actual ones. casper hinted that there may be a way to locate them in 1.31 though
I know there are APIs. I actually created one for personal use. But it should be something included in stock CC.
giodamelio #4
Posted 08 March 2012 - 10:39 PM
There should also be somthing to tell what blocks are in your inventory. Somthing like
getID("<slot 1-9>"): Just returns the ID of the block in the slot you specify.