New Post Today
Hello for the third time everyone (unless I am counting wrong in which case I do not apologize.). This week I have mostly been working on implementing the sound into the game and doing some preparations for the Beta presentation.
While I found the sound last week I still needed to implement it into the game which was more difficult than I had expected. To start my work I first started watching tutorials on the Unity website to start my work, but I realized I faced some larger issues as I had no experience with coding or scripting so I needed to avoid that as much as possible. So while I viewed the tutorials I started fiddling around with the different setting and components on Unity.
After what I would consider a long while I started testing the Audio Source component and tried to get the sound working. I added the sound file and set it to activate on awake. Due note that I set this on the projectile so basically it meant that the sound would play as soon as the projectile spawned. At first it seemed like a good idea, but I ran into the problem that the sound file was to long and would overlap to much. So I returned to the internet to find a solution. At first I thought that I could write a simple script with some help from my programmers that would make the sound fade after the next projectile spawned. However this seemed a bit to much so I thought that maybe I could edit the sound so that I could remove the overlap.
In the end however I decided to change the sound entirely however since I wasn’t confident in my editing abilities and not sure if the sound would still work. When I tested the new sound however it seemed immediately like an improvement, the overlap was removed and with some slight pitch changing it would work for that gun. I then did the same thing for the other weapons which was basically just adding a Audio Source component to the projectiles. Next week however I will need to make a script for the enemies as I can’t add a sound component to our melee enemies since they don’t use projectiles. But that will be for next week.
Regards Oskar.