Hello,
I am trying to programme a shooter, but I do not want my character to shoot when he moves. I have tried a few things but nothing seems to work.
Hello!
Surely there is a more “pro” way, but in every game engine you can do the manual trick of making a variable or a boolean called “is_moving” and when you press the moving button, besides of moving the character, activates the boolean/variable, and when you release the button deactivates it.
With this variable you can put a condition in the Shooting that can only be activated when “is_moving” is off or 0.
I’m pretty sure there must be a more elegant way to do this, like checking that the character isn’t doing a certain animation, but this trick is one I’ve used in many engines, so I hope this helps you!
2 Likes
thx bro