Dustpuppy 16 Posted June 12, 2016 Share Posted June 12, 2016 And again i did something usefull (i hope). With this lib you can send a robot to a waypoint with just one call. local component = require("component") local wp = require("wp") wp.enableAutoCharge(true) -- set this true for automatic charging wp.goTo("test1", "north") -- robot goes to waypoint with label "test1" and faces then to the north Functions : goTo(name, facing) Move robot to the waypoint with the given name. Second parameter is only needed, if you want your robot to turn to north, south, west or east after arriving. Is good if you want to use it for sucking or dropping from chests. getScanRange() Return the range in blocks a robot searches for waypoints. Standard is 256 blocks. setScanRange(range) Sets the range in blocks a robot searches for waypoints. enableAutoCharge(value) Set this to "true" if you have a waypoint with a charger, you want robots to use for automatic charging when running out of energy. Autocharging is disable by default. getAutoCharger() Returns the label of the waypoint with the charger. Standard is "autocharger". setAutoCharger(name) Sets the label of the waypoint with the charger, if you don't want to label it "autocharger" The robot will go up from 5 to 7 blocks of his starting position. Every direction (north, south, east, west) has another height robots will move to prevent collisions. You can get the lib at pastebin with pastebin get PhLMDtaN /usr/lib/wp.lua Greetings Stephan Quote Link to post Share on other sites
Mokomoko 0 Posted October 4, 2016 Share Posted October 4, 2016 The command did not work, but pastebin get PhLMDtaN /lib/wp.lua worked like charm! Thx for your work! Quote Link to post Share on other sites
Majestad278 0 Posted December 18, 2021 Share Posted December 18, 2021 I was using you lib, but I can't use because, when i call the function goTo it say "z got a nil value" Quote Link to post Share on other sites