Enable/disable shooting in FPS

Hi! I’m working on a school project and I’m having some difficulties. In my game you should start without a weapon, then you should find it at a certain point and you should be able to shoot with it. I’ve tried it all, I can’t manage to do it and there are no tutorials online. Can someone help me?

It’s really not that hard. I would probably just use a boolean variable. When I do the input action to shoot I first set this variable to true and when its true I do my shooting. When it’s false I do nothing. Then in the logic where you don’t want the shooting to occur just set the bool value to false. That would disable the shooting. Then when you want the player to be able to shoot again set the bool value back to true.

It all depends on the complexity of your project…

Like xpgained said, it’s fairly simple to make by using bools (CanFire, IsFiring, IsReloading, etc).

However as you make some progress and things start to get more complicating, you might wanna consider making the weapon an actor on its own, add an inventory and a save system.
If you are new to unreal I recommend that you look up some tutorials.

@Terminenzo, I think maybe you’re at the point a lot of FPS people get to, where you just don’t want those white arms and a tennis ball flying around?

To get rid of the arms, you just have to mark them as ‘hidden in game’ in the first person BP.

To stop to tennis ball, for now, you need to edit the first person BP and disconnect the projectile section ( it’s commented ).

Thanks to each one of you! This is just an art project for a course in a digital arts academy, it isn’t really a game, so it would suffice the boolean

I don’t know if you are still having trouble but if you are look up virtus hub on youtube - he has a lot of tutorials covering FPS and weapon firing etc and it’s all done in mostly short 5 - 10 minute vids and he has them done in well organised play lists :slight_smile: