I have an Old West style door; that means, its driven by physics and when the player hits it, it moves (opens) and when the player leaves it closes.
Now i want to give it sound. So i made it this way (see screenshot).
So, ONHIT it plays the opening sound.
And when the player leaves the area (The trigger, onEndOverlap), it plays the closing sound.
As the trigger area matches the area wich the doors needs to move, it works. (When the player exit the collider, its the same moment at wich the door can release -the player was pushing it- and get to its original position).
But it has a problem.
If the player hits the door (and the opening sound trigger plays), and then he does not go through the door AND he does not exit the trigger (So he just stands there after hitting the door, at the same side he started), then the closing sound does not trigger. And it should, because it closes.
How do i detect that the player is standing still?
Is there a better way to do this?
Please if you cant understand what i want to make, just tell me. I can make a video or something.
The Trigger box is for playing a sound (the door closing) when you leave.
The problem comes if the player hit the door (and it opens) but stays inside the trigger box; so when the door closes the closing door sound will not sound, because you have not leaved the triggerbox.
As the door is driven by physics, i cant get any event to use for the play closing sound part.
Add a script for the door that plays the sound when the door closes. That can be just a bool check to see if it was closed before, and if not, then play the sound. You can just use the rotation value of your door for that. But I believe Unreal already has built-in manager for collision sounds, so add one for the door on the frame.