Why isn't there a.......?

Why isn’t there a ‘Gun Node’ in BP? It seems simple enough - a node that has all the parameters you would need for a gun but that could be extended with others as well. There could be a melee node as well. Maybe I should be making these things? LOL

What exactly do you mean by a gun node? Can’t you just make your gun BP and then bring it into your character BP as a child component? Then you have all the nodes related to your gun. You can also make your own base weapon BP and then create other blueprints based on it, that way all of your weapons will share common properties. And melee is more complicated and how you do it can be project dependent sometimes so i dont think there can be a single solution for it.

All the parameters you would need for a gun?

Guns work differently in all kinds of games. Compare Call of Duty to Halo to Red Orchestra/Killing Floor to ARMA to Receiver. All of them have very different goals in mind when it comes to guns.

This is something you should handle yourself for your specific use case.

Whilst we don’t need a gun node, setting up a weapon system for the first time is very daunting. You’re not just handling logic for things like bullet accuarcy & clip sizes, but you need to able to create a Weapon parent that can form the basis of all weapon blueprints, then you need to turn each weapon BP on / off as you switch weapons.

A solid set of tutorials on this topic would be fantastic for the community.

I’ve been thinking about doing something like that for the Marketplace. I’m currently thinking about a realistic Arma-like library that would support detailed real-world simulation of weapons. Posting a set of tutorials as I go along will help flesh things out as well as get feedback.

If you have a list of features you’d like to see or topics you want me cover, let me know.

Will be greate !

What I mean is why isn’t there a node that you can stick in a blueprint for a mesh that simply makes it a gun? Period. It could have fire rate, a slot for a projectile mesh and all that other stuff along with pins so you could add other things to it. That way you wouldn’t have to go through the process of building what actually is a fairly complex blueprint. It could be something you just add to your character or even a class… I guess. Can you tell I haven’t really thought this out too much? LOL But, yeah guns do work differently in all games but - they all fit into the character’s hand, they all fire some type of projectile (even if it’s sort of a physics thing like in Half-Life - which is what the extra pins might be able to accomplish), they all do some type of damage - somehow - mostly. I just thought it would be easier to have a pre-made node that doesn’t require a lot of wiring and wondering to get it up and running so that you could concentrate on the specifics as opposed to the basics. Same goes for melee. What is melee if not a way to do damage without a gun? If a character is punching, why do I have to tell UE4 that he should do damage? Why can’t I just add some sort of node to the animation that says ‘Hey his hands should hurt the other guy!’? Instead of going through the process of adding more collision meshes and so forth. I know melee is different though (suppose you’re kicking or using a bat?) Sure it could take into account all the factors you mentioned earlier and leave plenty of room for customization, but I think the very basic idea of a gun and how it works is pretty much universal. In hindsight I guess I might be asking Epic to do my work for me but it was just a thought.

@jCoder - I would love to see a detailed tutorial on guns and how to incorporate them with character motion, inventory, switching weapons. I get the basics of how it all works but right now I have to jump back and forth between unrelated tutorials and fill in the gaps using a hit or miss method. I get how to blend the animations (finally!). But how do you put all of this together? I want my game to work like ‘Borderlands’ but I’m having a problem wrapping my head around certain aspects of it. I get how to create the inventory and the hot keys but how do I switch weapons and animations or pull something out of my inventory without pausing the game? The best tutorial I found on inventory systems pauses the game when you pull up the inventory and I don’t want my entire inventory on screen all the time.

Because everybody has a different idea of what a gun should do. Laser or bullet, real physics or arcade physics, etc. One size fits all just won’t do it. Take a look at the issues with the Vehicle object. It’s limited to 4 wheels, which means people who want to do motorcyles, tanks or other vehicles are SOL.

Weapons and inventory are two separate subjects. I may do a tutorial on inventory, depending on how the Weapons tutorial turns out. I also don’t plan to focus much on animation or modeling, but will provide the hooks to start animations and to handle end of animations. For example starting a reload animation and then, when the animation finishes, change the gun state to ready from loading.

You can always map certain weapons to certain keys (like the classic number key switch). Vaguely, it would look like this:
Create action mappings for SwitchToSlot0, SwitchToSlot1, etc, then create a binding on the player controller that calls into your inventory to get the object bound to that slot, and then does the switch with that object.

@RPotter - I get that but, as far as implementing it goes… it’s just crazy. My character has 4 slots - ‘unarmed’ or ‘melee’, handgun, shotgun, combat rifle. There are 4 sets of animations. The process of putting all of that AND the guns together is nuts. I just saw a post where one developer is using multiple Locomotion graphs to make this type of scenario work. So I’m trying that now. I also found a series on inventory systems, like I said earlier, but the thing is that the game pauses when you go into your inventory in order to bring up your mouse which I feel is kind of a cheat. I like the fact that in Borderlands you can switch guns on the fly but while you’re doing it you’re still taking damage. It seems unfair to be able to switch to a grenade launcher when you’re getting your butt kicked while the enemy has to stand there and watch you do it… frozen. My point is I get how all of it works, it just seems like there should be a simpler solution.

The inventory system you are using is likely pausing the game on purpose, so you could simply not do that. I’m not exactly what you mean on the multiple animation sets. Do you mean for switching slots, or the character animations when each slot type is active?

Here is a link to the post on using multiple Locomotion Graphs: Is it possible to have two Locomotion graphs? - Blueprint Visual Scripting - Unreal Engine Forums. It looks pretty interesting. As far as the inventory system goes, I don’t know but I’m pretty sure you have to pause the game as the mouse is used to look around while playing and then when you pause you get the cursor to use on your inventory. Not having it pause could be worse as you would not be able to defend yourself while getting your butt kicked! But then again that’s what happens in Borderlands as well. You open your inventory to switch out a new gun and the inventory screen covers up the viewport while the enemies kick your butt. LOL

When the inventory is up, you could just disable the mouse camera control, which it may already be doing (I would actually have to see how it is implemented to tell you want exactly to change)

I’m really not extremely concerned about having a huge inventory per se. I’m just figuring out how to implement weapon switches. So far I’ve worked out the movement changes for each weapon, now I’m working out how to implement them. What I’m working on is the whole ‘is the pistol equipped’ state thing but I’m having problems with the other weapons. I think I’ll have to try to do some sort of boolean that tells the blueprint that all the other states should be set to false. Which is a pain. I’ve also set the weapons to hotkeys (numbers obviously) instead of using the inventory. I was going to do a big inventory but that’s just beyond me at this point. I’m also pretty lost on the whole ‘reload while crouching blending to standing’ part. Most of my character mechanics come from the Third Person video series which mentions that but never really shows how it should be implemented. I’m also severely dyslexic so it’s quite a bit more difficult for me to understand and work with this stuff anyway. I keep doing things backwards. LOL