I’m working with 3D animation files and audio files (ogg). I’ve managed to get the animation files to start and stop, but audio files only let me play and pause (why is there a difference?).
I think I need to create an if statement for the following, but I’m not sure where to start, or if it’s the correct way to do it:
My Menus and Buttons work in a similar way:
I have Menu 1 with Button 1.1, Button 1.2, Button 1.3, and Button 1.4.
I have Menu 2 with Button 2.1, Button 2.2, Button 2.3, and Button 2.4.
Click Button 1 to get to Menu 2 > this will close Menu 1, will open Menu 2, and will play an audio file.
This all works.
The problem is that sometimes the audio files talk over one another if I’ve pressed another button. I need to write a script that only allows one audio file to be played at one time. They can be interrupted, but then the audio file needs to stop and the next one begin. I also need the audio file to stop - not just pause - because it will need to start from the beginning again, so I guess I’ll need to use both pause and restart at some point?
If Audio 1 is playing, all other audio files are not playing / disabled and all other buttons are disabled
I don’t want to use timelines or a videoplayer symbol for this, so I’m putting the audio files in the hierarchy and then calling them through script using:
Any advice on how to get started is very welcomed!
Thanks very much in advance, Forum!