So with the BPI method, I’m holding the code in the player. Same code more or less.
The BPI, play sound just takes a sound
and the enemy override just takes a bool
In the player on begin play
( very similar, except those are calls to the BPI handler )
To handle the play sound event
( notice it’s just the same as before except we swap the sound if the enemy bool is set )
The handler for the bool is very simple
And the whole point of this operation, is that you don’t need to loop going over all the enemy areas. The enemy zones tell the player to change the sound
You don’t even have to cast, because the interface isn’t implemented by anything else