Holding Input Keys in blueprints

Hi,

I am making a magnet crane type system for my game which operates when the player finds the crane key and presses the console. The camera then switches to the camera which is under the crane magnet and inputs are disabled apart from the crane controls(only W in this case at the moment). I understand how to do most things with visual scripting but I don’t know how I would go about holding an input key so that the movement is looped, at the moment I have to keep pressing the W key in order to move the camera forward. I have tried to use the ‘While Loop’ component but that just crashes my game. Is there any way around this or any different solutions i can use? I’ve attached a picture of my blueprints. Visual scripting solutions only please, thanks.

Will appreciate the help,
Cheers.

Howdy!

Sounds like you’ll want to use the Gate node which will open/close while the button is held/released. More information on gates can be found here:

https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/FlowControl/index.html#gate

Hope this helps!

-W

Gate node worked like a charm :slight_smile: thank you very much