I’m very sorry for the late reply, but I was ill for the last couple of days.
To do this in NodeCanvas Behaviour Trees, you just need to use the “Iterate” Decorator node.
The Iterate Decorator, iterates a list of any type for each of it’s elements and executes the child node for each such iteration.
The child node can then be an Action Node for example, with the “Script Control/Execute Function” Task assigned.
In the following example, the Iterator will iterate each gameobject in the specified list and for each of such object the NavMeshAgent.SetDestination will be called.
There is also an example scene making use of Iterate Decorator node included in the examples, which you can download from the Downloads sections of this website, just in case you want to see it working in actions 🙂
Let me know if that works for you, or if you want more information.
Thanks!
Join us on Discord: https://discord.gg/97q2Rjh
Attachments:
Iterator.png
Login
Register
By registering on this website you agree to our Privacy Policy.