Code: http://pastebin.com/5ZMaTQB3
Description:
Ability to track vertical movement
Able to move more than 1 block at a time.
To Track Height:
When writing your program for a turtle running SmartTurtleOS 2.0 initialize height to 0 at the beginning of your code. When you use the smart movement functions, differences in height will be added and subtracted to height.
Example:
height = 0
smartMoveDown()
smartMoveDown()
smartMoveDown()
smartMoveDown()
smartMoveDown()
print(height)
height is now equal to -5API
smartRefuel()
Checks if fuel level is below 1 and refuels from slot 1 if needed.
smartDig()
Will clear the space in front of the turtle, taking into consideration falling blocks as well.
smartDigUp()
Will clear the space above the turtle, taking into consideration falling blocks as well.
smartDigDown()
Will clear the space below the turtle with the same persistence as the other movements.
smartMoveForward(distance int)
Uses smartRefuel(), Moves the turtle forward with persistence. Will attack or dig to get to the distance passed to it.
smartMoveUp(distance int)
Uses smartRefuel(), Moves the turtle up with persistence. Will attack or dig to get to the distance passed to it. Adds to the height counter.
smartMoveDown(distance int)
Uses smartRefuel(), Moves the turtle down with persistence. Will attack or dig to get to the distance passed to it. Subtracts from the height counter.
- Create your turtle.
- Right-click the turtle and type in "Pastebin get 5ZMaTQB3 startup"
- Type "Reboot"