It can be easily scripted but would need unnecessary amount of execution time and overhead. Instead it would be simple to store pointers of child and parents in c++ and counters for number of parents and childs in the structure node itself.

AI demands for prvious nodes arises due to the fact that, a AI should be able to walk in both direction's on a path. And thus seem natural where it would chase or evade the player.

If it seems as useless function implementation, then think about a path which could have hundreds of nodes and several thousand edges. Just to find the parents of such node, one would have to go through all nodes and its edges. Think about the no of times it would have to traverse through the path instructions to find no of edges leading from or to the node. It would be very simple to implement in c++ as pointers and counters in the linked list. The list would have to be double sided with n-sided pointers.

It is not necessary for me to explain the benefits to you, as you are better knowledged person in these matters.


My Specialities Limited.