I have a day night cycle set up and I am wanting to add general forest noises to the day (Birds) and general night noises to the night (Crickets, frog, ect.) however my current setup plays correctly (day sounds come in during day and night sounds come in during night at the times I have specifed) but doesnât stop when the other sound comes in so I have day sounds overlapping with night sounds. I have tried searching for a way to stop one if the other plays but havent come up with anything. I am a novice with unreal so pictures and simple explantions would be appreciated
What youâll want to do is make variables out of the Play2DSound. right-click on the sound input on the node and click âPromote to variableâ. Then what you can do with this variable is to stop the audio before it resets the DoOnce node. Give it a try.
Thanks for getting back to me so quickly. I have set up those sounds as variables but how would i go about stopping them before the reset on DoOnce. Thanks again!
Yeah definitely use a timer. It would be wasteful to spend every tick on this. And I would just put a stop node after the play sound with the sound used just before. If that doesnât work, maybe you could try adding a delay before the Do Once resets? Maybe the audio is finishing straight away and resetting.
Wow, that is great information, thank you both for getting back to me. One more question if you donât mind, what am I setting the variable type as? I have tried a few things and they donât seem to play nice with the stop node.
So you do that on the left to get the right variable type to hold the wave files, do it on the right pin to get the variable type to hold the playing sound which you can call stop withâŚ