Hero shot lock

Hi,
I would like my hero to be able to shoot only when he is standing still, I do not know where to start, maybe there is a function that would block the generation of a projectile, or while moving, it would block communication while trying to shoot
Thank you in advance for any help

Hey buddy,

There are a multitude of ways you can do this and it really depends on your character set up, however here is the most common method.

Add a branch to your fire function right after the input action, for the condition use your characters speed value and check if its less than or equal to 0. This should prevent your character from firing while you are moving.

Hope this works for you, let me know if not.

V0x

There are many ways to do it, here’s a generic one:

This will prevent you from shooting unless you’re still. If you’re falling / sliding or something else is moving you, you will still be unable to shoot.

Vector Is Nearly Zero is exactly what I was looking for, Thank you