[REQUEST] FPS Weapon System in Blueprints

Hi Everyone,

I’m currently setting up a Weapon System in Blueprints for an FPS and I’m finding that I’m spending most of my time just exploring different options and not sure what the best way to handle things and could do with some guidance in two key areas.

Firstly, how are you treating the player arms / body as a seperate mesh and / or blueprint from each other? If they’re seperate, how are you animating them to be in sync with each other and player input in the Player Blueprint. At the moment I’ve got the arms part of the player blueprint, they have their own anim blueprint and the weapon is seperate but there is alot of back and forth between Blueprints.

Secondly, is it possible to create an empty Weapon Blueprint that has slots for meshes, anims, blend timelines etc that I’ll create and then create sub / child blueprints of them? And if so, where would the children live, would I place them in maps or the player blueprint to fill out their data?

Thanks :slight_smile:

i’m thinking of doing a modular gun tutorial/no inventory atm.but being able to set the meshes,projectiles,dmg,etc…

That would be awesome. Until then, have you got any basic suggestions on the best way to handle guns & arms? Juggling 3 event graphs and 2 anim graphs for seperate guns and arms, tied to a Character Blueprint, does seem overcomplicated.

I have been tinkering with a Modular weapon system myself creating a base blueprint that contains all of the Weapon information itself, which pulls data from various structs. The structs themselves house the format for the data, but can be edited in the weapon blueprint to be customized to the individual weapon. From the base blueprint which houses the mechanics of the weapon I can extend off into child blueprints and just create different weapons based on that.

By various structs I mean a WeaponAnim Struct for example that houses the Weapon animations format that can be changed in the blueprints. My Animations that are looping are not montages as of yet, but I might attempt to convert them to be such down the road. But I use an enum to declare a weapons state such as Idling, firing, Aiming, Reloading which then fires off a series of either animations or montages depending on the action needed. As of right now, I use montages for things such as firing, reloading, and going into and out of iron sights which then move to a looping idle animation.

The system is really rough right now as I work out the kinks, but being able to cast to another blueprint allows me to change which animations are being played on the first person arms that are attached to the character and not the weapon. My goal is to make the blueprints as clean as possible and easily extendable so that I could update my project down the road with more weapons instead of having to modify a single blueprint that houses ALL of the weapons.

To detail a little more the structs work like categories in Archetypes from UE3. I have a struct for anims, one for weapon stats such as min/maxdamage, Rate of Fire and fire mode, one that handles recoil stats, one that handles an attachment for fire mode projectiles and (within the projectile struct I can modify velocity, and ranges) then 1 last struct that handles inventory data such as Name, Description, Weight, item level, rarity level and the inventory slot that it will sit in when equipped. I have also been experimenting with a weapon mods struct that will allow me to expose a series of Socket that can be modified that I can set per blueprint that will allow me to add things such as lasers, scopes, silencers and what have you.

When you say you’re creating Child Blueprints of the Weapon Blueprint, are you simply copying, pasting and renaming them, or is it possible to create an empty Parent Blueprint with exposed variables that can be filled out in Child Blueprints, then if you update the logic in the Parent, the logic in the children is automatically updated?

Nope, if you right click on the blueprint, you should see an option that says create child blueprint. I cannot remember the proper text that it displays, but its similar to that.

The parent blueprint will store all of the variables and functions that will be used throughout all of the weapons such as firing and reloading. All variables will be exposed and I cannot remember off the top of my head if the functions are or not. I do not believe that are. So if you wanted to have projectile weapons, and then instant fire weapons you need to make sure that your base parent is extendable to allow that, then you would make those children of the base, and then you would make children of those children to be the actual weapons.

Here is my WIP flow graph of the system. (I am working on fleshing it out more with comments, but this is the overall flow of the blueprints)

Thank you very much :slight_smile:

No problem, I hope it helps you!