Help with A Sprinting conditions

I have a simple sprint system set up so when I press shift my max walk speed increases but what I’d like is if I sprint I can’t shoot my weapon. I can’t seem to figure out how and I’m sure it’s pretty simple. Thanks for any response!

You should add a boolean variable called something like IsSprinting and set it to true when you press the sprint button. And then check for it inside your shooting logic. If it is true then don’t let the player shoot.

I figured it would be like that, but how can I make the Boolean cancel shooting?

You just add a Branch node inside your shooting logic and check this variable with it before actualy sending the character into shooting animation and etc.

Thanks! That works! Sorry it’s kind of a simple question, but I’m still learning.

No problems, if you need more help just let me know :slight_smile:

You can close this question for tracking purposes if you wish to.

If you’re up for a few more questions I’ve got some other unanswered ones about how to create a base weapon and then children off that and than have that attach to the player but you’ve done your share. Thanks again!

Hey, could you go into a bit more detail about that? You can add a static mesh to your player by using a add static mesh component node or you can always use attach to nodes as well?

I want to have a weapon system where there is a base weapon and all the weapons are just variations off that, so when you select your weapon or pick it up, you have a new weapon that is blueprint wise different, but still cast the model to the player when equipped. My problem is I don’t really know how to do most of that. I know how to attach to a socket, but my weapon is in the character BP and I can’t seem to get a functioning weapon outside of my Character BP.
In a nutshell- I’m having trouble casting actions to trigger and function from a weapon BP cast to a character BP.