Architecture for behaviour trees with scheduled tasks [SOLVED]

Hi dear JGO :slight_smile:

I am starting to work with behaviour trees. I think i’ve got the rough architecture of the behaviour trees (BT’s from now on) down, but i am struggling with a key concept that i guess, i didnt understand right in the tutorials.(http://aigamedev.com/open/article/behavior-trees-part1/)

EDIT: Please refer to my second post, which explains my problem/question quite a bit better. Thank you very much!

The tutor speaks about a lookup table, where you can store ‘goal oriented behaviours’, the more modular the better and a task scheduler.

Now my question(s):

  1. Should an actor/entity always have a BT assigned to it + have some kind of node to process a task from a list, or,
    should one iterate the scheduled tasks and pass a BT instance to the actor and remove the BT instance from the actor upon SUCCESS/FAILURE/ERROR?

  2. Would a scheduler, literally have instances of BT’s as the ‘task’, and just pass that tree to an actor? Or would a task be a data structure that just describes what sort of BT it is?

  3. How would one pass a task to an actor that already has an active BT asigned to itself? I guess one could dynamically append/remove BT’s in the existing tree, but that seems like a bad idea to me.

I think, that an actor should always have a BT asigned, but i don’t know how to integrate a task from a list into a running BT, which will then have to be removed/appended, from a structure (BT), thats where i would loose all the control/advantage of pre-designed behaviours.

Need some help :slight_smile: Thank you very, very much in advance!