Posted 30 July 2013 - 12:36 PM
Flow is a turtle library that tracks positions, stores waypoints, and pathfinds to wherever you want to go.
Setup
When you first load flow, you will need to set the position with
flow.setPos(x, y, z, f)
Make sure to set these correctly by using F3 to find where.
Usage
If you want to take advantage of the pathfinding features, either set waypoints or store positions.
Waypoints
flow.setWaypoint(name, [x, y, z])
If x, y, and z are omitted, the turtles current position will be used.
Goto a waypoint with
flow.gotoWaypoint(name)
This will pathfind to the waypoint. Note that the turtles rotation will not be stored, so make sure you turn the right direction.
This will return a boolean value, success.
Pathfind to position
flow.pathfind(x, y, z)
This will return a boolean value, success.
Full docs
flow.wander(moves) - Wanders around for x moves.
flow.reset(sure) - Resets map, waypoints, and position if sure is true.
flow.getWaypoints() - Returns an array of waypoints
flow.delWaypoint(name) - Removes waypoint by name
flow.gotoWaypoint(name) - Goes to waypoint by name
flow.setWaypoint(name, [x, y, z]) - Sets a waypoint by name
flow.pathfind(x, y, z) - Attempts to pathfind to the given point
flow.face(face) - Faces face(0, 1, 2 or 3)
flow.setMapping(domap) - Sets mapping or not. Recommended to keep on so the turtle will learn faster. Basic mapping is a fast process. Mapping is enabled by default.
flow.setAdvMapping(doadvmap) - Sets advanced mapping. Recommended to keep on for a while when starting. Advanced mapping is disabled by default.
Download
Github: https://github.com/S...lob/master/flow
Bugs: https://github.com/S...programs/issues
Credits for pathfinding go to TehPers for his awesome API.
Setup
Spoiler
Make sure to load flow on every startup so the position is accurate.When you first load flow, you will need to set the position with
flow.setPos(x, y, z, f)
Make sure to set these correctly by using F3 to find where.
Usage
Spoiler
You can continue running your programs as normal, because flow overwrites the turtle API.If you want to take advantage of the pathfinding features, either set waypoints or store positions.
Waypoints
Spoiler
Set a waypoint withflow.setWaypoint(name, [x, y, z])
If x, y, and z are omitted, the turtles current position will be used.
Goto a waypoint with
flow.gotoWaypoint(name)
This will pathfind to the waypoint. Note that the turtles rotation will not be stored, so make sure you turn the right direction.
This will return a boolean value, success.
Pathfind to position
Spoiler
Pathfind to a point withflow.pathfind(x, y, z)
This will return a boolean value, success.
Full docs
Spoiler
flow.update([file]) - Updates flow to the latest release. Recommended to run on startup.flow.wander(moves) - Wanders around for x moves.
flow.reset(sure) - Resets map, waypoints, and position if sure is true.
flow.getWaypoints() - Returns an array of waypoints
flow.delWaypoint(name) - Removes waypoint by name
flow.gotoWaypoint(name) - Goes to waypoint by name
flow.setWaypoint(name, [x, y, z]) - Sets a waypoint by name
flow.pathfind(x, y, z) - Attempts to pathfind to the given point
flow.face(face) - Faces face(0, 1, 2 or 3)
flow.setMapping(domap) - Sets mapping or not. Recommended to keep on so the turtle will learn faster. Basic mapping is a fast process. Mapping is enabled by default.
flow.setAdvMapping(doadvmap) - Sets advanced mapping. Recommended to keep on for a while when starting. Advanced mapping is disabled by default.
Download
Spoiler
Pastebin: http://pastebin.com/b4NusRJkGithub: https://github.com/S...lob/master/flow
Bugs: https://github.com/S...programs/issues
Credits for pathfinding go to TehPers for his awesome API.