Behavior Tree inactive or in state STEPS BACK: -1

Hi!

I´ve encountered this weird problem recently, that my behaviortree just won´t start. I have setup my AIcharacter, possessed it with my AIController and inside the possess function I´ve run the behaviortree. Even when I debug whether my AICharacter has BehaviorTree assigned and whether it´s running, it shows exactly that.

This is how my unfinished behaviortree looks like.

This is how I run the behaviortree in code. Character->BehaviorTreeAsset is of type BehaviorTree and setup via editor.

I hope there´s enough information to make deductions based on this. Also there are lots of threads that are associated with the same problem so I post them all here (they might find their answer if I get my answer).

I finally found the solution to my problem.
It seems I had forgot to add the line in the BeginPlay() function, which was:
Super::BeginPlay();

I have enountered this problem continously, but I tend to forget to call out the superclass functions whenever I override something… Anyways, always be sure to call out superclass function before you write logic in your c++ class.

1 Like

Thanks so much for posting the fix. This was a bit of an obscure problem.