# change a variable in receive abort ai, but the next task dont read this variables

**URL:** <https://forums.unrealengine.com/t/change-a-variable-in-receive-abort-ai-but-the-next-task-dont-read-this-variables/1890373>\
**Category:** AI\
**Tags:** Behavior-Tree, bttask, unreal-engine, question\
**Created:** [June 5, 2024, 7:04am UTC](https://forums.unrealengine.com/t/change-a-variable-in-receive-abort-ai-but-the-next-task-dont-read-this-variables/1890373 "2024-06-05T07:04:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![HernanAcks](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HernanAcks](https://forums.unrealengine.com/u/HernanAcks)\
**Post date:** [June 5, 2024, 7:04am UTC](https://forums.unrealengine.com/t/change-a-variable-in-receive-abort-ai-but-the-next-task-dont-read-this-variables/1890373/1 "2024-06-05T07:04:54Z")

</div>

I have a selector with 2 tasks, in the first I implement an abort event where I set a variable to true, in the second task I have a decorator that reads that variable and executes if it is true, but takes it as false, the tree is restarted, and upon reaching this selector, the task just there takes it as true and is executed

 ![BTree](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/6/a/66a4e40a1c1dae7e6a31aa885009044da9226713.png)  
this is the behavior tree  
 ![abort](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/a/a/caaec2f162c9e3f846ca089c496ba0f6cfa52471.png)

and this is the abort event in BTT\_piñas\_altas task

---

<div class="post-metadata">

**Author:** ![Nightwolf](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nightwolf/32/917179_2.png) [@Nightwolf](https://forums.unrealengine.com/u/Nightwolf)\
**Post date:** [June 5, 2024, 1:14pm UTC](https://forums.unrealengine.com/t/change-a-variable-in-receive-abort-ai-but-the-next-task-dont-read-this-variables/1890373/2 "2024-06-05T13:14:50Z")

</div>

Send BPs of tasks, behavior tree and anywhere else relevant stuff is being executed please

else your answer is somewhat meaningless, the problem is execution order  
see what i mean doesn’t tell you anything really
