Posted 23 April 2014 - 01:50 AM
What is Turtle Controller?
Its a API for the Turtles to control them better than with turtle.forward()
Now its easier to Build Houses and other Buildings
Features:
The turtle has a facing variable if its not the special facing they will rotate to this side and then they use turtle.forward(); ex.they now just rotating 2x left if the facing variable on "right"
Documentation:
Example-Code:
This Code will build a 2height and deep tower out of slot 1 'material' , and puts the trash in slot 16
IMPORTANT:
! COPY THIS CODE ON THE TOP OF YOUR APPLICATION !
Source-Code:
http://konrad-site.d...rtlecontroller/
!!! Please Back link me if you use this code !!!
Its a API for the Turtles to control them better than with turtle.forward()
Now its easier to Build Houses and other Buildings
Features:
The turtle has a facing variable if its not the special facing they will rotate to this side and then they use turtle.forward(); ex.they now just rotating 2x left if the facing variable on "right"
Documentation:
function TC.init()
function TC.placeForward([slotname=nil],[ignoreCount=false])-- places a block in their front(facing,placing) and use the 'slotname' slot if ignoreCount=0 the amount of items in the slot can be 0 and they will not switch to their parent(if they has been linked)
function TC.placeBack([slotname=nil],[ignoreCount=false])-- places a block in their back(facing,placing) and use the 'slotname' slot if ignoreCount=0 the amount of items in the slot can be 0 and they will not switch to their parent(if they has been linked)
function TC.placeLeft([slotname=nil],[ignoreCount=false])-- places a block in their left(facing,placing) and use the 'slotname' slot if ignoreCount=0 the amount of items in the slot can be 0 and they will not switch to their parent(if they has been linked)
function TC.placeRight([slotname=nil],[ignoreCount=false])-- places a block in their right(facing,placing) and use the 'slotname' slot if ignoreCount=0 the amount of items in the slot can be 0 and they will not switch to their parent(if they has been linked)
function TC.placeDown([slotname=nil],[ignoreCount=false])-- places a block under the turtle front(facing,placing) and use the 'slotname' slot if ignoreCount=0 the amount of items in the slot can be 0 and they will not switch to their parent(if they has been linked)
function TC.placeUp([slotname=nil],[ignoreCount=false])-- places a block over the turtle and use the 'slotname' slot if ignoreCount=0 the amount of items in the slot can be 0 and they will not switch to their parent(if they has been linked)
function TC.digDown([slotname=nil],[ignoreCount=false]) -- digs up if slotName defined the block will be transportet to slotName
function TC.digForward([slotname=nil],[ignoreCount=false]) -- digs up if slotName defined the block will be transportet to slotName
function TC.digBack([slotname=nil],[ignoreCount=false]) -- digs up if slotName defined the block will be transportet to slotName
function TC.digLeft([slotname=nil],[ignoreCount=false]) -- digs up if slotName defined the block will be transportet to slotName
function TC.digRight([slotname=nil],[ignoreCount=false]) -- digs up if slotName defined the block will be transportet to slotName
function TC.digUp([slotname=nil],[ignoreCount=false]) -- digs up if slotName defined the block will be transportet to slotName
function TC.selectSlot(name,ignoreCount) -- selecting a slot from his name
function TC.createSlot(id,name,parentslotname,autoswitch) -- creating a new slot TC.createSlot(1,"cobblestone") or for linked slots usting: TC.createSlot(1,"stne") ; TC.createSlot(2,"stne2","stne",true) ::: autoswitch=if the slot is empty it switchting to their parent
function TC.lock() -- this function locks the turtle will reacts but not acts
function TC.unlock() -- unlocks the turtle now they're no more frozen
function TC.faceForward()-- lets the turtle rotating to her/him/whatever's front side
function TC.faceBack()-- lets the turtle rotating to her/him/whatever's back side
function TC.faceLeft()-- lets the turtle rotating to her/him/whatever's left side
function TC.faceRight() -- lets the turtle rotating to her/him/whatever's right side
function TC.moveForward() -- lets move the turtle forward(facing forward then moving)
function TC.moveBack() -- lets move the turtle back(facing back then moving)
function TC.moveRight() -- lets move the turtle right(facing right then moving)
function TC.moveLeft() -- lets move the turtle left(facing left then moving)
function TC.moveDown() -- lets move the turtle down
function TC.moveUp() -- lets move the turtle up
function TC.setSecureMode(on) -- If a player is in front of the turtle the turtle freezing while the player stand before her/him/she
function TC.setDestroyBlockingBlockMode(on) -- if on=true the turtle will destroy all blocks that blocking him (if they go forward and gravel is in front of it they will desroy these
Example-Code:
This Code will build a 2height and deep tower out of slot 1 'material' , and puts the trash in slot 16
TC.init()
TC.createSlot(16,"trash")
TC.createSlot(1,"material")
TC.digDown("trash",true)
TC.moveDown()
TC.digDown("trash",true)
TC.placeDown("material")
TC.moveUp()
TC.placeDown("material")
TC.moveUp()
TC.placeDown("trash")
TC.moveUp()
TC.placeDown("trash")
IMPORTANT:
! COPY THIS CODE ON THE TOP OF YOUR APPLICATION !
Source-Code:
http://konrad-site.d...rtlecontroller/
!!! Please Back link me if you use this code !!!