Storing values after Destroying actor
I have a projectile that is spawned when the player fires. The projectile creates a actor(soundTarget) when it hits a wall, then destroys itself.
The next time the player fires, the new projectile should be able to find the reference to the actor(SoundTarget) that was previously created and replace it with its own, then destroy itself again.
So a reference variable to SoundTarget should always exist, and be updated/replaced every time the player fires. But since the projectile gets destroyed, it doesn't get maintained. I tried linking the projectile to a controller which I was hoping to use as just a repository for the reference variable, but when i call the controller at the beginning of the script it always fails. What am I doing wrong. Should I even be using a controller bp in that way?
The projectile is a pawn class, and I do have it referencing the controller.
Here is the script. https://blueprintue.com/blueprint/bhwvdj3k/
asked Apr 23 '19 at 07:49 PM in Blueprint Scripting
Follow this question
Once you sign in you will be able to subscribe for any updates here