# Why my Boolean didn't work here?

**URL:** <https://forums.unrealengine.com/t/why-my-boolean-didnt-work-here/487992>\
**Category:** Blueprint\
**Tags:** boolean, unreal-engine, Blueprint, question\
**Created:** [August 25, 2021, 2:49pm UTC](https://forums.unrealengine.com/t/why-my-boolean-didnt-work-here/487992 "2021-08-25T14:49:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_ba9aff19](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ba9aff19](https://forums.unrealengine.com/u/anonymous_user_ba9aff19)\
**Post date:** [August 25, 2021, 2:49pm UTC](https://forums.unrealengine.com/t/why-my-boolean-didnt-work-here/487992/1 "2021-08-25T14:49:15Z")

</div>

This is what I want my Boolean to do. But it didn’t work.

 ![347280-screenshot-314.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/b/0/5b07036212fa7f675963ca02b38e34dc79e858a4.png)

 ![347321-screenshot-315.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/4/3/94377895113064d4ad52b82e6a740a5c4e272014.png)

  
Yet, if I change it like this... its works, so there shouldn't be any problem other than this Boolean on my blueprint.   

 ![347322-screenshot-316.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/d/6/ed6fbd9ab15a1b0fb2811029b18e2d51a43e32fe.png)

  

This is how the “SpawnTile” function being executed.

 ![347323-screenshot-317.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/b/8/2b80a40befeb56ec58ec930e9328e9eab2475ff2.png)

  

Can anyone tell me why that Boolean didn’t work?

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [August 25, 2021, 3:00pm UTC](https://forums.unrealengine.com/t/why-my-boolean-didnt-work-here/487992/2 "2021-08-25T15:00:08Z")

</div>

Hello! At start your initial value for **Test** is false; When you run all stuff in Spawn Tile with **Branch** node then nothing is happening because **Test** is false.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ba9aff19](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ba9aff19](https://forums.unrealengine.com/u/anonymous_user_ba9aff19)\
**Post date:** [August 25, 2021, 4:30pm UTC](https://forums.unrealengine.com/t/why-my-boolean-didnt-work-here/487992/3 "2021-08-25T16:30:21Z")

</div>

But at the end it will be set to True, because I want to set the “Local\_ClassIndex” to be 0 at the first loop, and 1 on the next loop and so on

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ba9aff19](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ba9aff19](https://forums.unrealengine.com/u/anonymous_user_ba9aff19)\
**Post date:** [August 25, 2021, 9:00pm UTC](https://forums.unrealengine.com/t/why-my-boolean-didnt-work-here/487992/4 "2021-08-25T21:00:58Z")

</div>

Nvm… I found the problem, It was because I’m using local variable, thanks for the help btw
