Bullet swap code help

hi im a beginer and i need help with this code im trying to pick up a bullet and equipment it basically touch projectile equipped a new and different projectile. thanks for the help!

Can you specify your problem? In your Blueprint you destroy the ProjectileComponent and then Activate it, that does not make sense to me.

so when you start you have your default bullets ur bouncing yellow balls but when you pick up the ammo it changes it grenade ammo or speeding bullets etc :slight_smile:

Nevertheless you call activate on a destroyed component without changing it. I don’t understand this.

my thought process was destroy the current bullet, and once its destroyed activate the projectile

So what you basically do now is, you check if your bullet overlaps something and cast the overlapped object to a FirstPersonBullet1 again. But this cast seems not necessary since no matter if it works you destroy the ProjectileMovementComponent and Activate it. This current setup does not make sense to me.

So what I think you want to do: Pick up a new projectile from an ammo box or something else with the player, and then change the bullet type that will be spawned.

So what you need to do is, go into the Blueprint of your pawn/character and on Overlap with a certain bullet pickup (therefore use an extra blueprint type, so if a player gets hit by a bullet he doesn’t pick it up) change a property in the pawn blueprint to the Bullet Blueprint class that this pickup stores. Then, when you shoot, you read that property to determine which bullet to spawn.

thankyou so much works perfectly now!! your the best!!