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:


You can change it to:


( same kind of thing for movement )

oh my god im an idiot cheers man