Varies Posted February 25, 2015 Share Posted February 25, 2015 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. 1 Quote Link to comment Share on other sites More sharing options...
Xerion Posted February 25, 2015 Share Posted February 25, 2015 public boolean walk(Position pos, int energyThreshold) { WalkingEvent event = new WalkingEvent(pos); event.setEnergyThreshold(energyThreshold); return execute(event).hasFinished(); } This should work. 1 Quote Link to comment Share on other sites More sharing options...
Varies Posted February 25, 2015 Author Share Posted February 25, 2015 Thanks I'll try that out later. Quote Link to comment Share on other sites More sharing options...
Joseph Posted February 25, 2015 Share Posted February 25, 2015 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(); } Quote Link to comment Share on other sites More sharing options...
organicjello Posted February 25, 2015 Share Posted February 25, 2015 Is there anyway to activate run from just using the Settings() class? Quote Link to comment Share on other sites More sharing options...
Joseph Posted February 25, 2015 Share Posted February 25, 2015 Is there anyway to activate run from just using the Settings() class? ya using settings#setRunning(boolean run); Quote Link to comment Share on other sites More sharing options...
Botre Posted February 25, 2015 Share Posted February 25, 2015 getSettings().setRunning(true); Quote Link to comment Share on other sites More sharing options...
AresScripts Posted February 26, 2015 Share Posted February 26, 2015 getSettings().setRunning(true);From the mouth of god humself Quote Link to comment Share on other sites More sharing options...