Hey everyone!
I didn’t make a video itself, as I just thought a post would be better. Plus, I don’t really know how to make videos of my screen… perhaps I should learn it!
I guess I figured a way to use different audios for the door opening or closing. I tried many things, including creating new variables in the C++ code, but they didn’t work. I couldn’t manage to get those variables to show up in the Blueprint…
In the end the solution was already in the Blueprint we developed, in a variable called Direction that is outputted in the Timeline we were already using!
That Direction variable is an Enum (remember them from Bulls and Cows?), and it tells us if the door is opening or closing at a given moment. All we have to do is to make a Switch statement with it and play a different sound according to the direction it is going:
This is the section of my Blueprint that implements this. You can ignore what is above the yellow-ish line.
This is, of course, only if you want to play closing or opening sounds at the same instant of the motion (that is, the door will make noise when it is near the door frame). In case you wanted to make different noises at different moments in the motion, you can just create new event tracks in the Timeline.
Hope this helps!