Why is my Event making my boolean true?

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

Level blueprint: LVLHelp posted by anonymous | blueprintUE | PasteBin For Unreal Engine 4

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

Yeah, it looks ok, but what happens?

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

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?

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

What would you change with this code?

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?

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

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

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 :wink:

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