That is about time to add sound effects for enemies, as the background music for the main menu and the game itself was working correctly for some time, I needed to add some sound effects that would make player aware when he is followed by enemies.
I spent couple of hours trying to make this work, as when attaching audio to the specific game object is very easy, but playing sound effects using mainly scripts is quite tricky as Unity has two components for that-Audio Source and Audio Clip. At the beginning I encountered problems with using Audio Clip as a variable as it was missing Audio Source component so I added it as a sound to the enemies. Then I was playing around with some audio properties to get the most as I could from making sound effects work after player enters specific area(when enemies start following the player).
No comments:
Post a Comment