Single gun / Multi-bullet system ((Help))

Hello, so I am trying to figure out how to go about setting up a cool weapons(ammo) system. Currently, I have it set up so that the player starts with Bullet 01. On Ammo02 overlap, the bullet upgrades to Bullet 02 (2 bullets shoot instead of 1) and so on.

But I am wanting to make a single actor that if the player overlaps, they can get upgrade 02. If they hit the same actor again it will give upgrade 03 and so on instead of several different actors pulled in.

I would assume to use an array, but not sure how that would work.

If anyone has played games like Blaster Master or Contra, similar gun system where the more you pick up gun upgrade it changes bullet style or count.

Thanks for any help…

I would have a variable for the number of upgrades the player has collected. We’ll call this variable NumUpgrades. now every time the player picks up the upgrade item you would have that blueprint increment the NumUpgrades variable on the player. then create logic based on the numupgrades to fire a function that many times, a for loop would work well in this case as long as your not firing visible projectiles.

Yes I am firing projectiles.

I have in my set up now, 4 sockets to shoot 4 different styles of bullet. the first 3 are single, double, and triple. The fourth being a separate style bullet (bigger hit power).

My Current BP(s) in PlayerBP and Ammo02BP.

Below i will post a basic setup i came up with that does most of the functionality that your setup does but in my opinion its a bit simpler.
In the setup i made when the fire button is pressed it gets the selected ammo type(normal, explosive, rubber, etc) and checks to see if the ammotype is able to be shot in multiples(Burst Fire). if it cant burst fire then it proceeds to the spawn actor and spawns one bullet. If the ammo can burst fire then it checks to see how many upgrades the player has collected and runs a loop that many times, so if the player collected 0 upgrades it would fire once, if they collected 1 upgrade it would fire 2 bullets, if 2 upgrades 3 bullets, etc. this way its simple and scale-able.
I also made a pickup item that upon overlapping with the player would get the variable numupgradescollected from the player and increment it by one.
With a system like this you could in theory create as many ammo types as you wanted that look and act differently, and keep upgrading as many times as you would like.

I’m unfamiliar with the AmmoType class nodes. How do I get those?

Its actually a variable. i created a blueprint actor that i called ammo which is the item you will be spawning. then i created a variable and instead of using say a int or a bool i searched for the ammo blueprint i had made and when you click on it in the dropdown menu it will ask if you want a actor reference or a class reference and just select class. normally you could just right click the class pin on the spawn actor from class node and promote it to a variable but i wanted a variable type a little more specific so i could take its default value. the default value is a variable within the ammo BP.

This is where I am at.

Also by using one actor (ammo in this case) as a base class you can create children that inherit attributes from it while still containing their own individual characteristics. like you could have the logic that states that the bullet does damage on impact in the base class and all the children would do damage on impact, the children however could define the type of damage that they do(fire, cold, etc) and how much

So I added a print string at the end to count the number of pickups and only when I fire it says 2, before and after getting the pickups.

No it doesn’t function at all. I still at least get one bullet. But no matter how many ammo upgrade I pick up nothing changes. Still trying to figure it out. lol sorry.

Sorry, dumb me forgot to add the other sockets. It does count the upgrades, but dose not fire the bullets from any sockets but the center one(one bullet).

i was just playing with it too and it seems like the delay was messing it up i think. i was using a print string in my ammo and its showing that they all are being spawned when theres no delay. but for some reason it was only spawning 1 with the delay. sorry about that it worked with a delay in theory so i didnt check that part before hand

Ya, I removed the delay, but still only fires from one socket.

were you trying to fire from different sockets in different locations? i was thinking you had a gun and you were spawning the projectiles at the tip of the barrell. i also just made a workaround to space the bullets out by putting a delay inside the ammo before it begins moving based on the index times 0.2. so all the projectiles get spawned then begin moving at regular intervals.

Ya, sorry if I confused you. This is what I have. All 3 fire from start before pick up.

ok so you want to begin shooting 3 bullets each from a separate barrel then when upgraded you will shoot a total of 6 bullets 2 from each barrel and so on. ok if that’s the case id so you have it basically now.

I actually want a single bullet on start, 2 bullets with upgrade1 and 3 bullets with upgrade2 if that makes sense.

I originally had them as 3 actors for pickups. But I am trying to do the pickups via one actor.

ok so total of 3 bullets then once you have the second upgrade. thats easy to do. really all you need to do is change the location that each once spawn at which can be done with a switch. so plug the socket transform into the option pins on the switch (if you need more options then right click the titlebar of the node) then plug the index into the bottom pin nad the output into the spawn transform. this will take the transform from pin 0 for the first one spawned then the second one will be spawned from the transform of 1, the third from pin 2.