Good day all. I am trying to create a system where projectiles fired from weapons use the stats assigned to the weapon that fired them, instead of assigning the stats directly to the projectile itself. I think I almost have it, but am running into an issue. As you can see from my screenshots, I am attempting to pull the damage variables for a projectile from the weapon that fired it by referencing the currently equipped weapon. The actual damage and more complicated calculations will occur in the monster class, since they will eventually have resistances and armor to include in the equation. However, when I run the game, I get the errors pictured. Any assistance that can be provided would be much appreciated. Thanks.
Edit: Is it possible perhaps to reference the spawner of the projectile?
No pictures here.
But easy solution:
Create damage variable in projectile and check editable and expose on spawn.
In weapon bp in spawn actor node, you will get damage input. Plug damage from weapon to that input… in projectile plug damage to damage actor you hit.
I figured it out. It was an issue with the way I was inflicting the damage to the monster. I’ve got the weapon class passing stats to the projectile class which passes to the monster class (for the more complicated calculations) so I missed a step in there. Thank you for your help.