Hi all,
I’m hoping that the answer to this is far simpler than I think it is but I’ve looked around on the various forums and threads and seen several different answers across the last 4 years.
So, here’s the situation.
I’m putting together an FPS game and I’m trying to avoid having lots of blueprints.
What I’d like to do is have a single blueprint for each weapon ammo type i.e. BP_Projectile, BP_Explosive etc.
The Weapon BP’s already set the rate of fire and clip sizes but currently the damage is stored in the Projectile.
I’d like to have it so that the Weapon also carries it’s damage information and when it fires “SpawnActor - Projectile Base” I want the Engine to tell the projectile what it’s damage is.
I’m hoping that this means when the ActorOverlaps the target, the Enemy_AI can get the damage information from the bullet that just hit it instead of having to attempt to cast to different weapons or to check which of several WeaponBP’s has just shot it.
I’ve tried writing functions and interfaces that set the “Damage” and having the target cast back to the ProjectileBP but it doesn’t seem to work. Also, when I try to Cast to the Projectile BP, I struggle to get an “Object” reference to attach to it.
Like I said, there seems to be a lot of conflicting advice but it’s split across several years and I can’t tell if there’s been a new addition recently that will be a magic cure all function for this kind of thing.
Many thanks in advance.