# I want to spawn characters with different skeletal meshes.

**URL:** <https://forums.unrealengine.com/t/i-want-to-spawn-characters-with-different-skeletal-meshes/2138197>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, Blueprint\
**Created:** [November 20, 2024, 6:08pm UTC](https://forums.unrealengine.com/t/i-want-to-spawn-characters-with-different-skeletal-meshes/2138197 "2024-11-20T18:08:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![SD\_Gamer45](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SD\_Gamer45](https://forums.unrealengine.com/u/SD_Gamer45)\
**Post date:** [November 20, 2024, 6:08pm UTC](https://forums.unrealengine.com/t/i-want-to-spawn-characters-with-different-skeletal-meshes/2138197/1 "2024-11-20T18:08:00Z")

</div>

Hi,  
I also want to call an array but didn’t understand how to use it.  
I am using this code to spawn NPCs, but I want them to spawn with different skeletal meshes.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/c/0/ac0ef91e3c87f2dabfca400b5f2a8cf2c3724a14.png)

---

<div class="post-metadata">

**Author:** ![Sklor](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sklor/32/1074675_2.png) [@Sklor](https://forums.unrealengine.com/u/Sklor)\
**Post date:** [November 20, 2024, 6:28pm UTC](https://forums.unrealengine.com/t/i-want-to-spawn-characters-with-different-skeletal-meshes/2138197/2 "2024-11-20T18:28:01Z")

</div>

I suppose you could have the spawner dictate this, but I’d have a function in the NPC that randomly selects the Skeletal Mesh that the spawner would then call for each spawned NPC.

If the NPC always should have a randomized skeletal mesh, then I’d consider having the NPC call the function directly in its BeginPlay function, then the spawner just has to worry about spawning.

Here is an example of what that function would look like.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/b/d/2bdceea90838c65450ef7ea2faa33b9f11d6729b.png)

---

<div class="post-metadata">

**Author:** ![SD\_Gamer45](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SD\_Gamer45](https://forums.unrealengine.com/u/SD_Gamer45)\
**Post date:** [November 20, 2024, 8:16pm UTC](https://forums.unrealengine.com/t/i-want-to-spawn-characters-with-different-skeletal-meshes/2138197/3 "2024-11-20T20:16:16Z")

</div>

That’s great! Now how should I call this function in my spawner BP?

---

<div class="post-metadata">

**Author:** ![Sklor](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sklor/32/1074675_2.png) [@Sklor](https://forums.unrealengine.com/u/Sklor)\
**Post date:** [November 20, 2024, 8:53pm UTC](https://forums.unrealengine.com/t/i-want-to-spawn-characters-with-different-skeletal-meshes/2138197/4 "2024-11-20T20:53:10Z")

</div>

How are you actually spawning your NPCs in the world? I don’t see you are using the spawn actor node:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/9/e/89eaeea44f3645b9eb5097c2b4d98e1724e76acd.png)

If you are using it, you can simply drag off of the return value (is a reference to the NPC actor that was spawned) and call the random mesh function you created in that blueprint class.

---

<div class="post-metadata">

**Author:** ![SD\_Gamer45](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SD\_Gamer45](https://forums.unrealengine.com/u/SD_Gamer45)\
**Post date:** [November 20, 2024, 8:56pm UTC](https://forums.unrealengine.com/t/i-want-to-spawn-characters-with-different-skeletal-meshes/2138197/5 "2024-11-20T20:56:26Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/d/d/6dd30bd5e504c98f4649b1004ced731d762e788f.png)

---

<div class="post-metadata">

**Author:** ![SD\_Gamer45](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SD\_Gamer45](https://forums.unrealengine.com/u/SD_Gamer45)\
**Post date:** [November 20, 2024, 9:11pm UTC](https://forums.unrealengine.com/t/i-want-to-spawn-characters-with-different-skeletal-meshes/2138197/6 "2024-11-20T21:11:10Z")

</div>

It worked Thank You so much bro.

---

<div class="post-metadata">

**Author:** ![SD\_Gamer45](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SD\_Gamer45](https://forums.unrealengine.com/u/SD_Gamer45)\
**Post date:** [November 29, 2024, 6:24pm UTC](https://forums.unrealengine.com/t/i-want-to-spawn-characters-with-different-skeletal-meshes/2138197/7 "2024-11-29T18:24:00Z")

</div>

@Sklor  
Hi, Is there any way by which I can add values to this array in BP?  
I am making a spawner for spawning NP cars, and I want them to follow path points as they spawn in the world.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/6/c/66c56800c975e9a59ea8888e47d1e50afaa0a7c5.jpeg)

---

<div class="post-metadata">

**Author:** ![Sklor](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sklor/32/1074675_2.png) [@Sklor](https://forums.unrealengine.com/u/Sklor)\
**Post date:** [December 2, 2024, 5:40pm UTC](https://forums.unrealengine.com/t/i-want-to-spawn-characters-with-different-skeletal-meshes/2138197/8 "2024-12-02T17:40:52Z")

</div>

Yeah, you just have to have an instance of it already spawned in the world. So, this would need to be either: (1) you add one to your scene, then selecting it and adding to the array, or (2) doing it through scripting by spawning it, then referencing that variable from the reference and adding the splines to it.

---

<div class="post-metadata">

**Author:** ![SD\_Gamer45](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SD\_Gamer45](https://forums.unrealengine.com/u/SD_Gamer45)\
**Post date:** [December 6, 2024, 4:17pm UTC](https://forums.unrealengine.com/t/i-want-to-spawn-characters-with-different-skeletal-meshes/2138197/10 "2024-12-06T16:17:59Z")

</div>

@Sklor  
I am using the same spawner for the NP cars.Also, is there any tutorial that you would recommend for making instances? I am a beginner to UE, so I am unable to figure out how I can make this spawner instance.
