Behavior Tree ticks

Hello , I am French, sorry in advance for my writing mistakes.

So i’ve been wondering about the tick system in Behavior Tree, let me explain:

In the begining of the Behavior Tree witch I added breakpoint , right after pushing play , the Behavior Tree execution is at the first task (Picture1) waiting to be execute, the first task end successfully then the Behavior Tree is waiting at the second task. when the second task end successfully the execution goes back to the root.

So here are my questions :

  • First : Is a tick needed at the begining of the tree . So to explain a bit more , let’s say at the begining of the execution ( TICK 0) do we need a TICK to go to the first task (So TICK 1) or are we at TICK 0 when we are waiting to execute the first Task ,
  • Second let’s say we end the first task at TICK n do we begun the execution of the next task at TICK n or at TICK n+1(do we need one tick to go to the next task to be execute) (Picture 2)
  • Third , at the end (picture3) do we need a tick to go back to the root, more precisely , let’s say the last task end at TICK n , When does the next task (the first one will be execute) TICK n+1 TICK n+2 …

In my understanding for now (let’s say we just need 1 tick to complete task1 & task2) , we begin the first task at TICK 0 , after this tick we begin the second task at TICK 1 then after that we go back to the root who use the next tick so TICK 2 we are at the root and the next execution will be TICK 3 at the first task

I hope I have been able to explain , feel free to ask me more detail about my question if needed

ps: when I talk about “ticks” I only talk about the one of the behavior tree (let’s say for exemple that the behavior tree is a closed system)

Thank you , Ryseur :slight_smile: