If you're getting an error in "Stop Firing Weapon" about AudioComponent

The stop firing weapon function is throwing me errors (with Unreal 4.23.1) when I’m being killed while shooting:

Blueprint Runtime Error: "Attempted to access AudioComponent_0 via property Weapon Fire Sound, but AudioComponent_0 is pending kill". Blueprint:  BP_Marine Function:  Stop Firing Weapon Graph:  Stop Firing Weapon Node:  Stop

To fix this, just add an “Is Valid” node before the Stop audio function:

3 Likes

Thank you! Cheers!

This will cause the rifle fire sound not to play if your are firing when you die. If you remove the IsAlive check, it will play as expected if you are firing when you die.

Thanks for this. I had this too :slight_smile:

You can a IsValid node before stopping the weapon fire sound. This will solve this issue.

Privacy & Terms