How to turn off a light completely by pressing a key, only while being inside a collision volume near it?

Hi. I am working on a survival game, in which my character can turn off a light completely by pressing a key, only while being inside a collision volume near it.

I have made a blueprint. What I’m trying to do is to toggle visibility, as long as both boolean variables are true.

So… my character goes and enters volume. “Is globe overlapped” variable is set to true. The branch node sees in condition that only one variable is set to true, so it shouldn’t fire. If I press the F key, the second boolean variable, “Is globe taken” is also set to true, so the branch sees that both are set to true so it fires. This is the logic I tought it would work, but it is not working. When I enter the volume, the light toggles on or off. Pressing F key does nothing.

http://s12.postimg.org/l7wpwkj7h/question6.jpg

http://s10.postimg.org/x1344dpnt/question4.jpg

in the event: ActorBeginOverlaping, drag from the “otherActor” and “Castto yourcharacter” it will specify the actor that is triggering the trigger box, try if it makes the BP works and let us know.

But, why no use a flipflop node?

Hopefully, paultech on unrealengine irc chat gave me the answer. I’ll post it here for reference and for others who might have the same problem.

http://i.imgur.com/6CbQK5P.png

http://i.imgur.com/5bOnpjY.png

He said that overlap might have been tiny (the collision on the static mesh).
He created a separate sphere collision.