How to stop x and z input's while in cover

Title says it all really i want to make my character only move on the y axis when its in cover is there a way to do this with blueprints

In the character BP, you’ll find the code for jumping and forwards / backwards movement. You need to put a bool in there to stop it happening if they are hiding. So the jump looks like this:

Screenshot-20191223-at-19.31.55.png

You can change it to:

Screenshot-20191223-at-19.35.53.png

( same kind of thing for movement )

oh my god im an idiot cheers man