RedditPP Mascot

RedditPP

r/unrealengine • … • u/EliteNinjas

Help with inheritance / child blueprints / class hierarchy

So I have created a spawner which spawns mobs. Currently I have to set which mob pawn class reference I want it to use to spawn that specific mob. Id like to customize it so I can spawn a random mob, but still give it some guidance. For all my mobs, I want them to have a hierarchy like class structure.

For example, the "Pony" mob would have as follows: Mammal-> 4 Legged -> Horse -> Pony

Zebra would be similar: Mammal-> 4 Legged -> Horse -> Zebra

but Cow and Bison would be slightly different: Mammal-> 4 Legged -> Bovine -> Cow (or Bison)

I'd like to make a class that is for mammals, and then a child class for 4 legged, and then another child class for bovine and horse, etc. It keeps getting more specific like real life hierarchical [taxonomic ranks](https://en.wikipedia.org/wiki/Taxonomic_rank). Then I can just grab the Mammal (or whatever rank I choose)'s class reference and create a macro or function or whatever to randomize all the mobs within that reference and output the pawn reference of the specific mob. That way when I add more mobs and already have multiple spawners for each region and family, it wont be a pain to add that mob to the matrix of mobs within each spawner and call upon each individual mob. I want to just call upon the parent and have it output a matrix of the child components. Is this possible?

— 0