# Behavior Tree Not Running, but C++ Says it is!

**URL:** <https://forums.unrealengine.com/t/behavior-tree-not-running-but-c-says-it-is/134927>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [December 12, 2019, 8:53pm UTC](https://forums.unrealengine.com/t/behavior-tree-not-running-but-c-says-it-is/134927 "2019-12-12T20:53:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eightball126](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eightball126](https://forums.unrealengine.com/u/eightball126)\
**Post date:** [December 12, 2019, 8:53pm UTC](https://forums.unrealengine.com/t/behavior-tree-not-running-but-c-says-it-is/134927/1 "2019-12-12T20:53:21Z")

</div>

My behavior tree in the editor is not running when I press play, and there is a message that says STEPS BACK: -1. It is also not executing in game either, not running at all. In C++ I used:

```auto

//run the behavior tree on this character

BerserkBTComp->StartTree(*Berserker->BerserkerBT);

```

Then I tested it like this:

```auto

if (BerserkBTComp->IsRunning())
{
    GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("Tree Is Running"));
} else
{
    GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("Tree Not Running"));
}

```

It comes back that the tree is running but nothing is being executed on the Tree in the game or simulated in the BT editor. I also see the blackboard keys are not being set in the editor but they are being set in C++ when I debug is VS 2019. I’m using UE4 4.23.1.

Also, I have verified my BB keys are correctly named everywhere.

Any help would be greatly appreciated.
