Now that that's done, I can look for sound effects. I found two "medieval" sound effects packs which includes sounds for swords, bows, and dozens others. Unfortunately, most of the blade-on-blade sounds are just light tapping. There's no real clash. So I probably won't be using many of those sounds.
Luckily, the unity asset store has some free sounds. I found a "woosh" sound that I will probably use for the sword swing.
To be able to play a sound effect using script, I needed to first add these two lines as variables. As seen here, I'm using an "unsheath" sound. Afterwards, I changed UnsheathSound to PlayerSound, since that audio source will be used for more than one sound.
I then inserted a line of code into the script that controls the sword selection, so if the sword is not equipped and "1" is pressed, the sound will play.
Next class I will add more sounds such as the sword swing, sheathing the sword, and the crossbow sounds.
No comments:
Post a Comment