Download

2 different weapons, 2 different ammo = same weapon displayed?

Hi all!
I’m working on modding some weapons and have everything working but there is a small glitch I was hoping someone may know how to resolve.
Basically I have 2 new weapons, a pistol and a rifle. I also made 2 new ammo’s. Both weapons will use both ammo. I have it working fine for the most part, I can drag either ammo type onto to either weapon and it works. The issue is strange, If they both are using the same ammo everything is golden. Once I put the other ammo type onto either of the guns is when it gets weird. Lets say I have the pistol in slot 2 and rifle in slot 3. If I equip the pistol with 2nd ammo and hit hotbar slot 2, I may or may not get the pistol, I may get the rifle instead. Sometimes both hotbar buttons will produce the same weapon (2 pistols or 2 rifles) other times they will be opposite (hit 2 for pistol get rifle, hit 3 for rifle get pistol) and every once in awhile it will work as it should. Until I change ammo again. Once I have both using the same ammo, it goes back to normal.
I’m guessing it has something to do with the drag onto classes but not sure where I went wrong since it is working for the most part. I know it can work since you can have a regular bow, compound and a crossbow all with different yet interchangeable ammo. One thing I did notice is that when i spawn one of my new weapons in the editor, it comes with a loaded clip but does not show what ammo it has loaded (the little icon in corner) where a bow or crossbow does.
Help me please!
Thanks,
P0k3 out!

EDIT: So I did a little more testing in the editor and I spawned in just the rifle and the secondary ammo. I fired a few rounds from the default ammo it spawns with and then switched to the secondary ammo. Everything worked fine. When I put the original ammo back, the rifle then became a pistol. Get exactly the same results when I only spawn in the pistol. When I switch back to the primary ammo, it becomes a rifle. It seems a little random after that, can switch back and forth between the ammo’s and sometimes I’ll have a rifle, others I’ll have a pistol. Thought maybe since editor has access too all resources it may be different cooked. Nope, same issue on server. Hopefully that will help shed a little more light on what the issue may be. I’m baffled.

The only thing I can think of off the top of my head is to check that you have the PrimalItem blueprint’s “Support Drag Onto Item Classes” and “Ammo Support Drag Onto Weapon Item Weapon Templates” fields set up in the same order.

Also check if your ammo parent class is the Same for both Ammo! that happened to me once :stuck_out_tongue:

Ding ding ding ding! Jackpot, You win! That was it, Thank you!
Whatever primalitem-x is set to 0 under “Support drag onto item classes” must be the same as weap-x set to 0 under “Ammo support drag onto weapon item weapon templates”
Thank you both for the quick replies, Much appreciated!