Use Blueprint Class with more components/meshes

Hello guys.

I’ve created a new Blueprint Class for my minigun weapon: http://prntscr.com/8rjm78
Now, in the component, I’ve added my Minigun Model: http://prntscr.com/8rjmcq

Now, If I want to add another weapon into the game (for example, a shotgun), should I create A NEW blueprint class for every weapon I’m gonna add into the game?

I’d like to use my Blueprint Class for every weapon I will add without creating a new copy.

Can you help me?
Thanks in advance!

Generally it is a bad idea to try and keep all the different weapons in the same blueprint. Imagine you have 10 different weapons. Now imagine that each of those has a lot of special behaviour that the others don’t have. That’s a whole lot of special cases which would blow up the blueprint’s size and make it unreadable and un-maintainable.

It is a better idea to gather all the properties and behaviours your weapons have in common and create a blueprint for it. Then you derive each specific weapon from that blueprint and only add in the special behaviour for each specific weapon. Certain problems might also be easier to solve by using a blueprint interface.

At the end, I did as you said.

But, does it exist a “c++ version” of my blueprint class?
For example, the screen above represents my blueprint: it has an event tick linked to an AddActorLocalRotation

Had I wanted to do the same thing the blueprint does BUT in C++… how?

You can generate the C++ code from your blueprint, though I don’t remember how :expressionless: A staff member made a post showing how you can do it.