So I am making a topdown game and there are 4 lanes and there’s eight squads (four for each team) and five actors in each squad. This is what I am trying to do: I want every squad to be identical at the start. Each squad can be leveled up and their stats changed (every unit in that one squad - their damage is upgraded.) Each individual unit in the squads have their own healthbar.
So right now I have them all under one blueprint and they all share the same healthbar and levelup. I initially thought to make a parent for each squad (so eight parents,) and then every unit in that squad would be a child (so five children/squad.)
But I was wondering if there was a better way and if that would work? I never used child BPs before and if there is an easier way, to just make instances off of the base object, I would rather do that! (But don’t know how)
Video of squads:
link text
Your inheritance tree should depend on the behavior you wanna achieve. Are all the characters gonna have the exact same abilities and behaviors? or will they be different based on their team? Because if all that’s gonna change is some colors and health values then making them inherit is just a waste. If some of them will fire lasers but other will fire bubbles or have a super jump or whatever then yeah, inheriting from a base class might be worth it so you can put all the common logic there and separate it from the specific logic for each different character type.
Well I want there to be different squads too, like swordsmen, archers, spearmen, etc. but that’s later on. So they’ll have different kinds of attacks but the squads of the type of warrior will all behave the same, the only differences would be small stuff like damage, critical hit percentage, and miss percentage. But offence and defense squads are the same. I am mostly just confused as to how I can reference a progressbar widget for each individual actor without making a widget for each actor (that would be 40 widgets running at a time) and things like that. To damage only that one unit and not the whole squad when a unit attacks; stuff like that.
Well I want there to be different squads too, like swordsmen, archers, spearmen, etc
Yeah, then you should probably do child blueprints for that.
I am mostly just confused as to how I can reference a progressbar widget for each individual actor without making a widget for each actor (that would be 40 widgets running at a time)
40 widgets running at a time shouldn’t be a problem for the Unreal Engine, common. If you are doing a thousand then yeah, get worried about performance.
Okay, so basically what you’re saying is that I’ll be fine making each unit have it’s own behavior entirely instead of inheriting and that it’s easiest to just make 40 different BPs? That would be simpler 
Wait wait wait wait, 40 different BPs? Nope, don’t do that. There should be 1 widget blueprint called characterProgressBar or whatever and each character can have an instance of it.
How much do you know about programming in general?
I don’t know what you mean about each character having an instance, I meant to have 40 different character BPs, that’s bad to do right?
I’m just trying to understand how to make instances of a BP with the instances having their own values of the variables defined in the main BP. So let’s say the BP has a health variable, I’m trying to figure out how to make instances of this BP where each character has their own health/healthbar and so that when one dies, they all DON’T die, which is what I have it doing now because I only have one BP and just duplicated it.
See, they are all the same BP:
Ok. Look a blueprint doesn’t represent 1 actor/character/pawn in your world a blueprint represents a class. The blueprint as its name suggests is the model from where the objects you create are based. Think of it in this terms the blueprint is the cookie cutter, the actual actors in your game are the cookies, the cookie cutter is just the base, it gives forms to the cookies, after they are created each cookie is on their own, they can have more chocolate chips or less chocolate chips but still they have the same form the cookie cutter gave them.
There is probably some logic error on how you are applying damage to them, because if you apply damage to only one of them and he dies, the other ones should be ok.
How much do I know about programming in general? Not very much.
In the screenshot in the comment just before, is it okay to have all the AI to be using one blueprint (in this case, it’s Unit)? What I have set up is actors named unit1, and an actor named unit2, etc. And they’re all just the Unit BP…
My computer just got destroyed and I have to order a new OS so I can’t check on the Damage function I made, until a lot later so I’ll just mark this solved and thanks for the explanation.