What am I doing wrong here? I have a scene component light and I just want to turn it on an off with T.
If the “Directional Light 1” variable is accessing an actor in the game, that should work. How do you have this set up in your project?
Basically, it’s just a weapon blueprint. There is a first person gun, a third person gun, and a light. They are all component actors. Directional Light 1 is a component in the blueprint.
Are you trying to make a flashlight for the gun? if so, don’t use a directional light, use a spotlight. The Directional Light will light the entire scene, which might be why you don’t see the effects of the toggle.
You just need a do once sir with a reset in the released. Please note that the event for pressed is fired continuously while pressed so you are turning it on and off rapidly as you press it.
Found the problem. The gun was not receiving input, but the playerpawn was.
it’s not true. “Pressed” event only occurs once per each “press->release” cycle
It did back in 2014. It no longer does it.