Is it possible to add ActorComponents to Actors via C++
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.
asked Sep 30 '18 at 12:05 AM in C++ Programming
Follow this question
Once you sign in you will be able to subscribe for any updates here