February 25, 201510 yr I was wondering how to activate the run energy, I was digging around the API and found the WalkingEvent class that housed the method setEnergyThreshold(#) and was wondering how to bring it into the program. I used WalkingEvent.setEnergyThreshold(#); and found out that the method is not static so that went out the window. I also was looking at anything that was inherited from this class and found quite a bit but was wondering which one I would have to "attach" onto setEnergy to allow me to turn it on. Thanks again guys, I am a returning programmer and was wondering if you could get me back into the kick of things.
February 25, 201510 yr public boolean walk(Position pos, int energyThreshold) { WalkingEvent event = new WalkingEvent(pos); event.setEnergyThreshold(energyThreshold); return execute(event).hasFinished(); } This should work.
February 25, 201510 yr Thanks I'll try that out later. you can use this for a position public boolean walk(Position pos, int energyThreshold) { WalkingEvent event = new WalkingEvent(pos); event.setEnergyThreshold(energyThreshold); return execute(event).hasFinished(); } This should work. or this for a path public boolean walk(Position[] path, int energyThreshold) { WalkingEvent event = new WalkingEvent(path); //can add .setOperateCamera(boolean) event.setEnergyThreshold(energyThreshold); return execute(event).hasFinished(); }
February 25, 201510 yr Is there anyway to activate run from just using the Settings() class? ya using settings#setRunning(boolean run);
Create an account or sign in to comment