Is there a way to Randomize Body Part Meshes?

Is there a way I can create a Blueprint to randomize several body parts for a few meshes for a single enemy to easily create multiple looks?

From what I have seen I think the normal way to do this would be to create 3 different AI Enemy Types that have different meshes to look differently from one another and such.

However, I am thinking it would be cooler if I could somehow use 1 AI Enemy and create a blueprint to randomly generate how it looks based on 3 heads, 3 torsos, 3 legs, 3 arms, 3 feet as an example.

Example #1 -
Enemy A has Head Type 1, Arms Type 1, Torso Type 1, Legs Type 2, Feet Type 1

And Example #2 -
Enemy B has Head Type 3, Arms Type 2, Torso Type 2, Legs Type 3, Feet Type 1

Can someone advise me of how to do that or would I be better off just making different enemy types and some sort of master enemy spawn blueprint to house and randomize it?

Hey!

Proof of concept:

If you have separated body part meshes like you said head, torso, legs and so on you can simply randomize this.

First you need add Skeletal Mesh Array as many body parts you have. (Bodymeshes, Legmeshes etc.)
Second you need override spawn event or construct event (sry i not remember correctly, but im sure you will found that), you can do that in blueprint near “new function button” you see override function button :slight_smile:
Just search an event which run before or when actor spawned.
sidenote: But i guess construction script can handle that too for you :wink:

If you find that you can do randomize logic there, get the num of bodypart array, make a random integer in range 0 and array length -1 and get that skeletal mesh reference.
After this you have only one job, to set skeletal mesh in desired component.

Of course if you want this whole method can be done via AISpawn manager or something before spawn.
Concept is same except two things!!

Skeletal mesh body part arrays need to be stored in manager class, and ai char must have 4 skeletal mesh reference variable!!!
Two important thing this skeletal mesh reference must be marked as “editable and expose to spawn”, in construction script you need set this variables in component as skeletal meshes. :slight_smile:

If you exposed to spawn this variables spawn actor node automatically will show as input your skeletal mesh references, so when your manager spawn ai character just connect your references :wink:

Sounds like a good idea. I’ll definitely try that out and thank you for the advice.

you are welcome :slight_smile: let me know when you succes :wink: