I am trying to achieve functionality where an agent can move, eat, chop wood, mine, farm and do all sorts of different jobs which can change at anytime on runtime based on some priorities. (he can only do one type of job at a time)
I have found this forum post which was super useful because it's basically asking the same thing, however I have a couple more questions.
1. Why should we go with the method that was described in the post? Is this just a common practice of how to do this sort of thing or is there any specific benefit as opposed to loading in all possible Job types and then switching between them without reloading the tree, based on some conditional evaluation?
2. If we DO go with the said method, since the tree needs to re-load every time a new job type is selected, how do we actually re-load it? What specific code can be used to achieve this?
3. Finally, since we are often going to be re-loading this main tree to switch out it's external behavior trees based on the job type, how expensive is this reloading process and would it make sense to use external behavior tree pooling here?
Thank you!
I have found this forum post which was super useful because it's basically asking the same thing, however I have a couple more questions.
1. Why should we go with the method that was described in the post? Is this just a common practice of how to do this sort of thing or is there any specific benefit as opposed to loading in all possible Job types and then switching between them without reloading the tree, based on some conditional evaluation?
2. If we DO go with the said method, since the tree needs to re-load every time a new job type is selected, how do we actually re-load it? What specific code can be used to achieve this?
3. Finally, since we are often going to be re-loading this main tree to switch out it's external behavior trees based on the job type, how expensive is this reloading process and would it make sense to use external behavior tree pooling here?
Thank you!