Hello everyone!
I’m starting to recreate my BP scripting into C++, and I’m running into an issue with trying to get my C++ Actor to pull data from my C++ actor component.
My goal is to create a Fire and Reload function in the Weapon (C++ Actor) using data from the ActorComponent. The ActorComponent has the variables for Damage, Ammo, ReloadSpeed, etc. However, I cannot edit the variables from the the BP Weapon, trying to print out the default values returns null. Trying to fire from the C++ function crashes the game using a variable from the actor component. I’m able to access my variables if I add the component from the Editor but not from C++.
I want to be able to edit the ActorComponent variables from BP and call C++ functions from within Blueprint.
Here’s a link to the question on the UE subreddit with images provided