# Why is my Event making my boolean true?

**URL:** <https://forums.unrealengine.com/t/why-is-my-event-making-my-boolean-true/468119>\
**Category:** Blueprint\
**Tags:** boolean, bool, Script, branch, unreal-engine, question, Blueprint\
**Created:** [July 13, 2020, 7:24pm UTC](https://forums.unrealengine.com/t/why-is-my-event-making-my-boolean-true/468119 "2020-07-13T19:24:35Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![100\_Thieves\_Cold](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@100\_Thieves\_Cold](https://forums.unrealengine.com/u/100_Thieves_Cold)\
**Post date:** [July 13, 2020, 7:24pm UTC](https://forums.unrealengine.com/t/why-is-my-event-making-my-boolean-true/468119/1 "2020-07-13T19:24:35Z")

</div>

So my blueprint (FirstPersonCharacter) is working through a bool that tells the game if it has a Gun (true) or a Drone (false), it sets/should be bool to false when i press Z to equip my drone but as soon as i press Mouse1 (Shooting event) again it goes to true. any ideas on what could it be?

Main blueprint: [Help posted by anonymous | blueprintUE | PasteBin For Unreal Engine 4](https://blueprintue.com/blueprint/qhhtol59/)

Level blueprint: [LVLHelp posted by anonymous | blueprintUE | PasteBin For Unreal Engine 4](https://blueprintue.com/blueprint/76gg81za/)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [July 13, 2020, 7:37pm UTC](https://forums.unrealengine.com/t/why-is-my-event-making-my-boolean-true/468119/2 "2020-07-13T19:37:02Z")

</div>

It looks like your begin play is setting it to true.

---

<div class="post-metadata">

**Author:** ![100\_Thieves\_Cold](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@100\_Thieves\_Cold](https://forums.unrealengine.com/u/100_Thieves_Cold)\
**Post date:** [July 13, 2020, 7:41pm UTC](https://forums.unrealengine.com/t/why-is-my-event-making-my-boolean-true/468119/3 "2020-07-13T19:41:35Z")

</div>

It is because i want to spawn in with that gun, is that a problem? should i change?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [July 13, 2020, 7:44pm UTC](https://forums.unrealengine.com/t/why-is-my-event-making-my-boolean-true/468119/4 "2020-07-13T19:44:42Z")

</div>

What I’m saying is it’s your begin play that’s making it true, not your event…

So you start with the gun, then you press Z to get the drone, then what happens when you fire?

---

<div class="post-metadata">

**Author:** ![100\_Thieves\_Cold](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@100\_Thieves\_Cold](https://forums.unrealengine.com/u/100_Thieves_Cold)\
**Post date:** [July 13, 2020, 7:51pm UTC](https://forums.unrealengine.com/t/why-is-my-event-making-my-boolean-true/468119/5 "2020-07-13T19:51:35Z")

</div>

When i fire with the drone in my hand i should possess it.

What would you change with this code?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [July 13, 2020, 7:56pm UTC](https://forums.unrealengine.com/t/why-is-my-event-making-my-boolean-true/468119/6 "2020-07-13T19:56:07Z")

</div>

It basically looks ok:

1. you start with the gun ( and set the bool )

2. z destroys the gun and clears the bool

3. now the fire event spawns the drone

No? Do you press Z?

---

<div class="post-metadata">

**Author:** ![100\_Thieves\_Cold](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@100\_Thieves\_Cold](https://forums.unrealengine.com/u/100_Thieves_Cold)\
**Post date:** [July 13, 2020, 7:57pm UTC](https://forums.unrealengine.com/t/why-is-my-event-making-my-boolean-true/468119/7 "2020-07-13T19:57:21Z")

</div>

It should spawn the drone always after pressing Z. then i can possess it

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [July 13, 2020, 7:59pm UTC](https://forums.unrealengine.com/t/why-is-my-event-making-my-boolean-true/468119/8 "2020-07-13T19:59:10Z")

</div>

Yeah, it looks ok, but what happens?

---

<div class="post-metadata">

**Author:** ![100\_Thieves\_Cold](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@100\_Thieves\_Cold](https://forums.unrealengine.com/u/100_Thieves_Cold)\
**Post date:** [July 13, 2020, 8:00pm UTC](https://forums.unrealengine.com/t/why-is-my-event-making-my-boolean-true/468119/9 "2020-07-13T20:00:16Z")

</div>

Its saying as a True bool even after pulling the drone out and setting it to false

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [July 13, 2020, 8:04pm UTC](https://forums.unrealengine.com/t/why-is-my-event-making-my-boolean-true/468119/10 "2020-07-13T20:04:54Z")

</div>

I see it. You’re not clearing the bool in the Z chain of execution. You have to unset the bool when you press Z.

BTW: Put the fire event in the character, it’s much easier 😉

You’re only printing it, you need to set it to false:

 ![307120-here.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/e/c/cecb200d76d958acc0d0ee13bce729f0379c4571.jpeg)
