GaneratedBots 2 Share Posted January 6, 2019 So this is my first time scripting, I'm trying to get a handle on the framework of using nodes. I know this script would probably be easier to implement in a single java class but I want to learn how to use nodes as it seems like the go to framework for more complex tasks. Currently, I'm trying to build a fly fisher that will automatically go and kill chickens when it runs out of feathers. It consists of two nodes. One for killing chickens and the other for fly fishing. My issue is how to correctly set a good validate condition to switch between the two based on the number of feathers in the characters inventory. The way I was doing it (which doesn't really make sense since it will only kill a single chicken and go back) is Fly fish Node -> (c.getInventory().count(FEATHERS) > 150) Kill Chicken Node -> (c.getInventory().count(FEATHERS) <= 150) I feel sorta silly because I can't figure out a good way to create a good switching condition. Any help would be appreciated! Link to comment Share on other sites More sharing options...
GaneratedBots 2 Author Share Posted January 6, 2019 Ended up making a boolean variable in the main script with getter/setter method is this the recommended method?, also I can't figure out how to edit a previous post? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.