# How to Use the "Stop Logic" / "Restart Logic" Nodes?

**URL:** <https://forums.unrealengine.com/t/how-to-use-the-stop-logic-restart-logic-nodes/463970>\
**Category:** AI\
**Tags:** Behavior-Tree, ai-controller, unreal-engine, question\
**Created:** [April 19, 2020, 11:07am UTC](https://forums.unrealengine.com/t/how-to-use-the-stop-logic-restart-logic-nodes/463970 "2020-04-19T11:07:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![PhilRE](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PhilRE](https://forums.unrealengine.com/u/PhilRE)\
**Post date:** [April 19, 2020, 11:07am UTC](https://forums.unrealengine.com/t/how-to-use-the-stop-logic-restart-logic-nodes/463970/1 "2020-04-19T11:07:08Z")

</div>

Hello

I am looking for a way of restarting the behavior Tree my AI Controller is Running.  
After some Research it seems like the “Stop Logic” and “Restart Logic” (Brain component) Nodes are what i need.

I attempted to implement the inteded Functionality using these nodes to no success. I have not found any Documentation on the functionality of the Nodes in question and would like to know what exactly they can do for me.

Any further advice on how to stop or restart behavior trees would also be very helpful as my current Project hinges on this functionality.

---

<div class="post-metadata">

**Author:** ![Manoloon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/manoloon/32/1001796_2.png) [@Manoloon](https://forums.unrealengine.com/u/Manoloon)\
**Post date:** [November 8, 2021, 6:08pm UTC](https://forums.unrealengine.com/t/how-to-use-the-stop-logic-restart-logic-nodes/463970/2 "2021-11-08T18:08:32Z")

</div>

![351796-captura-de-pantalla-2021-11-08-150633.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/e/3/5e310f1cb4abda315f21e492cad84de2909baf62.jpeg)

just like this.

---

<div class="post-metadata">

**Author:** ![Manoloon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/manoloon/32/1001796_2.png) [@Manoloon](https://forums.unrealengine.com/u/Manoloon)\
**Post date:** [November 8, 2021, 6:19pm UTC](https://forums.unrealengine.com/t/how-to-use-the-stop-logic-restart-logic-nodes/463970/3 "2021-11-08T18:19:10Z")

</div>

the same for the Restart Logic.

---

<div class="post-metadata">

**Author:** ![Demeese](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Demeese](https://forums.unrealengine.com/u/Demeese)\
**Post date:** [March 16, 2023, 9:20pm UTC](https://forums.unrealengine.com/t/how-to-use-the-stop-logic-restart-logic-nodes/463970/4 "2023-03-16T21:20:49Z")

</div>

These nodes are not implemented. You can call them all you’d like, but it doesn’t change anything.

```auto
void UBrainComponent::StartLogic()
{

}

void UBrainComponent::RestartLogic()
{

}

void UBrainComponent::StopLogic(const FString& Reason)
{

}

bool UBrainComponent::IsRunning() const 
{ 
	return false; 
}

bool UBrainComponent::IsPaused() const 
{ 
	return false; 
}

```

As of 3/16/23 they are blank functions.

What i’ve done to combat this is just to make a Behavior Tree that is blank, or just have a Wait node in there. Call it BT\_Dumb. It still has a cost, but its better than leaving your main tree running.

RunBehaviorTree on the ai controller, passing in BT\_Dumb

---

<div class="post-metadata">

**Author:** ![FaCraM](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FaCraM](https://forums.unrealengine.com/u/FaCraM)\
**Post date:** [October 1, 2024, 7:58pm UTC](https://forums.unrealengine.com/t/how-to-use-the-stop-logic-restart-logic-nodes/463970/5 "2024-10-01T19:58:21Z")

</div>

Hi !  
I believe they’re override in BehaviorTreeComponent.cpp

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/5/c/05cdaeb718c3cd230ffded95a81de8d71f01498f.png)  
The other ones, Resume restart etc are here aswell

---

<div class="post-metadata">

**Author:** ![hollingsworth73](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hollingsworth73](https://forums.unrealengine.com/u/hollingsworth73)\
**Post date:** [March 15, 2025, 11:35pm UTC](https://forums.unrealengine.com/t/how-to-use-the-stop-logic-restart-logic-nodes/463970/6 "2025-03-15T23:35:13Z")

</div>

Restart Logic seems to reinitialize with default values. if your injecting subtrees you need to do it after the restart. injecting a subtree also waits until current tree has finished. stop logic cancels it. stopping immediately, restart logic. then inject before it gets a chance to run. this works for me.  
[stoplogicrestartlogic.bmp](https://forums.unrealengine.com/uploads/short-url/rqqwnyPGDAIIam2HggdLwkC6oT4.bmp) (2.2 MB)
