# Different types of ammo in a magazine

**URL:** <https://forums.unrealengine.com/t/different-types-of-ammo-in-a-magazine/2477639>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [April 27, 2025, 12:06am UTC](https://forums.unrealengine.com/t/different-types-of-ammo-in-a-magazine/2477639 "2025-04-27T00:06:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ground\_Zro](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ground\_Zro](https://forums.unrealengine.com/u/Ground_Zro)\
**Post date:** [April 27, 2025, 12:06am UTC](https://forums.unrealengine.com/t/different-types-of-ammo-in-a-magazine/2477639/1 "2025-04-27T00:06:30Z")

</div>

I am trying to make different types of rounds that can go into the same magazine. For example 5.56 ball, 5.56 tracer and 5.56 ap. I want to be able to mix them inside a magazine, such as 1 tracer, 5 ball, 5 ap, 5 ball, 5 ap, 1 tracer. I cannot do this with something like an array because it would just go: 2 tracer, 10 ball, 10 ap right? I could use BPs but would that be very cost ineffective?

Any other ideas on how to do this?

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [April 27, 2025, 8:32am UTC](https://forums.unrealengine.com/t/different-types-of-ammo-in-a-magazine/2477639/2 "2025-04-27T08:32:12Z")

</div>

Use a common base class for the ammo that can mix, set the magazine variable array type to the common class and then you can insert any ammo that inherits from that class.

Alternatively you could make an array of type actor and filter incoming objects via the actor tag or via in interface.

If you don’t need a physical representation of the bullets in the magazine then you could just have an array of structs which holds the current ammo mix info. Then you could retrieve the needed ammo via an object pooler upon firing.

---

<div class="post-metadata">

**Author:** ![Ground\_Zro](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ground\_Zro](https://forums.unrealengine.com/u/Ground_Zro)\
**Post date:** [April 27, 2025, 2:09pm UTC](https://forums.unrealengine.com/t/different-types-of-ammo-in-a-magazine/2477639/3 "2025-04-27T14:09:22Z")

</div>

So far, i am using an array of structs of BPs, I am just trying to see if there is a better way. But thanks for the info!

---

<div class="post-metadata">

**Author:** ![RedGrimnir](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/redgrimnir/32/1054683_2.png) [@RedGrimnir](https://forums.unrealengine.com/u/RedGrimnir)\
**Post date:** [April 27, 2025, 8:04pm UTC](https://forums.unrealengine.com/t/different-types-of-ammo-in-a-magazine/2477639/4 "2025-04-27T20:04:41Z")

</div>

Well I would recommend something else which is data assets, its a struct after all.

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

I have a generic item struct and i branch to many things from there like ammo

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/0/7/50781b0d82ea0a7342a8ae10cbae2f40030308f2.png)

My inventory subsystem distinguishes what its picked up, used, in bag etc. Keeps track of it and talks with player inventory component. So basically with that you can define different ammo types to same weapon type and it will just keep track of those in magazine.

If you want them ordered in a magazine that is a different question and I think arrays is the answer like 3dRaven said.

My weapon system only talks with inventory subsystem and asks couple of things like.

CanShoot?  
CanReload?  
SpendItem(Ammo)

etc

---

<div class="post-metadata">

**Author:** ![Rev0verDrive](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rev0verdrive/32/907214_2.png) [@Rev0verDrive](https://forums.unrealengine.com/u/Rev0verDrive)\
**Post date:** [April 28, 2025, 3:04am UTC](https://forums.unrealengine.com/t/different-types-of-ammo-in-a-magazine/2477639/5 "2025-04-28T03:04:28Z")

</div>

You can also do this with an Enum array in the weapon class.

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [April 28, 2025, 7:21am UTC](https://forums.unrealengine.com/t/different-types-of-ammo-in-a-magazine/2477639/6 "2025-04-28T07:21:38Z")

</div>

An enum would work too, but probably better to make it a Bitmask, BitmaskEnum if you want to make some calibers interchangeable at some point.

---

<div class="post-metadata">

**Author:** ![Ground\_Zro](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ground\_Zro](https://forums.unrealengine.com/u/Ground_Zro)\
**Post date:** [May 4, 2025, 3:38pm UTC](https://forums.unrealengine.com/t/different-types-of-ammo-in-a-magazine/2477639/7 "2025-05-04T15:38:27Z")

</div>

Ok, cool i will look into these other options as well and see what one fits best for what i am trying to do, probably a DA once i understand more on how to make one lol.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [June 3, 2025, 3:39pm UTC](https://forums.unrealengine.com/t/different-types-of-ammo-in-a-magazine/2477639/8 "2025-06-03T15:39:25Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
