Hey guys i need youre help.
Im new with the unreal engine 4 and i did a door which i can close and open also i add the sound for opening and closing… my problem is then the door is one the open animation and the sound plays i can spam the sound
maybe you can help me
Use a second boolean like “IsMoving”. Set it to true as soon as the door is either opening or closing and set it to false when the Animation Timeline is finished.
Then, after the Branch with DoorClosed, create a new branch on EACH (true and false) exec. Connect the “IsMoving” bool to it and use the “false” exec for the Play
Sound etc.
Alternatively, go the sound asset and open it. There’s a setting for how many instances you want of the same sound, you can set that to one. If you have a sound wave you will have to right click and make it a sound cue, because I think you will only find the setting there.
Edit: No problem. Feel free to send me 5% from your next game. I joke.
But the other might work too. I just don’t know if this would also limit another door to not fire the sound. So if 2 doors open at once you might only hear one with MaxL’s solution (or?).
eXi raised a valid point. I didn’t consider your game using more than one door, hahaha. The other solution posted is probably best. If you’re still against learning it then you can set it so that only one sound is active at time, but the old sound is killed and the new sound is played at the current location, the setting I’m referring to should be in the same place were you set it to one active sound.
This is the solution I used for the interaction within my project.
I would use a ‘do once node’ and then set a delay equal to the length of the animation as the ‘reset’. This means as soon as the animation ends, the player can re-interact with the object again.