# How do i add different types of bullets in Unreal Engine 5's First Person Template

**URL:** <https://forums.unrealengine.com/t/how-do-i-add-different-types-of-bullets-in-unreal-engine-5s-first-person-template/1819472>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, first-person-templat, Blueprint, question\
**Created:** [April 24, 2024, 5:05pm UTC](https://forums.unrealengine.com/t/how-do-i-add-different-types-of-bullets-in-unreal-engine-5s-first-person-template/1819472 "2024-04-24T17:05:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Floris522](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Floris522](https://forums.unrealengine.com/u/Floris522)\
**Post date:** [April 24, 2024, 5:05pm UTC](https://forums.unrealengine.com/t/how-do-i-add-different-types-of-bullets-in-unreal-engine-5s-first-person-template/1819472/1 "2024-04-24T17:05:53Z")

</div>

Hi! I am currently experimenting with the first person tamplate of unreal engine 5.  
I was trying to add multiple guns with different types of bullets. But i couldn’t find a way to make it work. I used the basic pre-made rifle as a parent-class for the new gun. I also made the basic yellow projectile and the weapon component parent-classes. I want to make the new gun shoot a new type of projectile with an entirely new mesh.  
I turned some values into variables to speed up the creation process.

Here are a view screenshots from my code:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/4/7/24760c95278d7f7f5ac0afe2f351650280c22592.jpeg)

---

<div class="post-metadata">

**Author:** ![Midisport\_8x8s](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Midisport\_8x8s](https://forums.unrealengine.com/u/Midisport_8x8s)\
**Post date:** [April 24, 2024, 8:28pm UTC](https://forums.unrealengine.com/t/how-do-i-add-different-types-of-bullets-in-unreal-engine-5s-first-person-template/1819472/2 "2024-04-24T20:28:36Z")

</div>

Where do you set BulletType?

---

<div class="post-metadata">

**Author:** ![Floris522](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Floris522](https://forums.unrealengine.com/u/Floris522)\
**Post date:** [April 25, 2024, 6:05am UTC](https://forums.unrealengine.com/t/how-do-i-add-different-types-of-bullets-in-unreal-engine-5s-first-person-template/1819472/3 "2024-04-25T06:05:41Z")

</div>

The bullet type is the basic yellow projectile by default.  
I was thinking about how to solve my problem and i realised that i don’t know how the projectile, the rifle, the character and the weapon component are connected to each other.  
I am currently tying to find the connection between the weapon component and the rifle. I wanted the weapon component as a parent-class for different weapon-componenst for different types of weapons.  
I think when i find the link between the two that i can complete the code by my self.  
If you know how to add multiple weapon components that work with specific weapons, please tell me how.

---

<div class="post-metadata">

**Author:** ![Midisport\_8x8s](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Midisport\_8x8s](https://forums.unrealengine.com/u/Midisport_8x8s)\
**Post date:** [April 27, 2024, 1:43pm UTC](https://forums.unrealengine.com/t/how-do-i-add-different-types-of-bullets-in-unreal-engine-5s-first-person-template/1819472/4 "2024-04-27T13:43:21Z")

</div>

If you can get a reference to your gun, you should be able to change its BulletType. I am not too familiar with the First Person Template.

---

<div class="post-metadata">

**Author:** ![Floris522](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Floris522](https://forums.unrealengine.com/u/Floris522)\
**Post date:** [June 24, 2024, 11:32am UTC](https://forums.unrealengine.com/t/how-do-i-add-different-types-of-bullets-in-unreal-engine-5s-first-person-template/1819472/5 "2024-06-24T11:32:18Z")

</div>

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

I’m trying to cast from BP\_BaseGun to BP\_Bullet but it doesn’t work for some reason.  
What am i doing wrong? Can someone please explain what makes the cast fail?
