How do I fire an event from a key input action?

Hi everyone. I am trying to set up a system where upon pressing F it activates torch and begins to deplete battery. Can anyone help me and tell me what I need to do to activate Deplete Battery section once I hit F? I’ve tried event ticks and branching, but none of it seems to work.

Sorry if this is an obvious solution, my first go at trying something like this.

http://puu.sh/eDLgn/95adf200a1.png

http://puu.sh/eDLeB/c36bd3850f.png

Hi DazzNoob,

You have two options:

  1. Create a function and put battery depletion code in function
  2. Create a Custom Event and attach that to battery depletion nodes

Then you can simply call function or event from appropriate Toggle Visibility node.

You can read more about Functions here:

https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/Functions/index.html

and more about Custom Events here:

https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/Events/Custom/index.html

Hope that helps!

Thank you.

I will try these both out.