I did it this way:
- Create another blueprint BP_SoundMute and place it somewhere on the map
- Open it and create there a bool „b_SoundsIsMute“
- Create a custom event „SoundMuteOnOff“ with flip-flop and set „b_SoundsIsMute“ on „A“ like False and on „B“ like a True
- Open my parent pawn actor and set a new event on the keyboard input key „M“
- „Get all actors of class“, „BP_SoundMute“, „get a copy“ and find the custom event „SoundMuteOnOff“
You can use this blueprint actor for 2 cases:
• cast from this bp to each actor in your scene to mute it (just add each new actor with sounds here)
• cast from each actor in the scene to check the bool (if something should be spawned muted)