Successful Times
I've solved my problem! On my own at that! Very proud of myself.
I've now set my game up so that the Doll House, Firetruck and Robot play sounds when the player gets near and fades out when the player moves away from it. Surprisingly, and funnily enough, using the first tutorial I used when getting into Unity - the "Adding Music to your Game" video. It is actually an idea I had before, but I couldn't get it to work for me at the time. I suppose I grew wiser in Unity as time went by. I simply adjusted the script to work for me and it now works perfectly. I've set it so that there is a cube which I've made my "trigger zone", so whenever the player steps on the cube, the music fades in at x speed, and when the player steps of the cube or "trigger zone", the music or FX fades out at x time. I now need to blend the cube better into the scene because I have been unable, even after asking some classmates doing a Unity based project, to find a way to make the cube invisible. However at least I've finally managed to get the one thing that was bugging me the most working. Below are images of the Doll House Trigger Zone game object in the inspector and hierarchy in Unity, and the Audio Mixer that helps control the fade in and outs (it is what the script looks for).
This is the script used. This is for the Doll House.
All of these scripts (each game object got it's own one, just so that if something goes wrong, I could refer back to them) are attached to the player object. One problem I faced here, though it was solvable, was the fade in and out time. I had to adjust them a lot for each one because sometimes it would fade in really late or out late or vice versa. I wanted it to be somewhat realistic with the fade ins so that as soon as you are near the object you can already start to hear it, and when you walk away, you can hear it fading off in the distance. This is the tutorial and script I used and altered:
To make the FX sounds of the Robot, I used Ableton's Software instruments to create my own sounds and then tested the sound out on my gamer friends to get their input on any alterations they would make. My goal was to make the Robot sound like a broken toy. This is because the Robot in the environment is not a complete one and is merely the head and an arm. I believe I successfully managed to achieve this in the clip. The clip consists of 4 tracks. The middle track I opted out of because it was too much/harsh on the ears for my liking at least. I added panning just to make things interesting. The below image is of the session view of the audio clip in Ableton.
To make the Doll House music, I used this clip I got for free in the asset store "Horror FXs", same on I used for my one of my Hellephants sounds, and imported it into Logic. Then I went online and got 3 audio clips of creepy laughter, one of which originates from the following video. I found this video ages ago (years), and so remembering it, figured it would be perfect. I then exported all three laughter clips to Ableton where I joined them together in one audio track and adjusted their volume as I saw fit. Then exported that track and imported it into logic with the backing track and added a finalised stereo tape delay on the laughter.
As for the Firetruck, I spent a very long time trying to find out how to make my own sound, after being inspired by the belt idea. Unfortunately, I came up with nothing. However over the weekend, I did manage to find a sound of a broken police car toy that had been left out in the rain and the siren was of course, broken. This is the video.
The video gave me an idea; to take an existing fire engine sound and just mess it up in Logic. I used the Flex time feature and altered the speed in parts of the audio clip as well as adjusting the pitch in some places. I feel the end product really came out well, as it really does sound like a broken fire truck. Not only that, ,but through messing the sound up, it sounds more like it's a toy truck as opposed to an actual one.
As you can see in the above image, I did lots of chopping, stretching and I have a bit at the end where I copied a part of the clip and added it to the end to make it play the same sound twice.
The belt idea also inspired me to dive deeper into making my own sounds for other things. More specifically now for the animals. I did more reading in the book "The Sound Effects Bible" by Ric Viers and the book "Game Development Essentials - Second Edition" by Jeannie Novak, and found that for mythical sort of creates, sound designers will use the sounds of pre-existing animals and combine them and add filters to them. So I did the same for my bear and my Hellephant. I combined animal sounds such as raccoons, tigers, lions, turkey gobbles..basically making sure that I did not at all use the actual sounds of the animals. So I refrained from using Elephant or Bear sounds. Of course doing that would have been a time saver and simpler, but I wanted to push myself more. This one I made for the Hellephant in Logic:
I managed to finally record the gun shot with my flatmates belt. I used the mic I got from Bob and recorded it in Garage Band, because for some reason the microphone would only show up there and not in Logic. Bob had told me so and I tested it too. Then i exported it into Logic and worked on it there. I recorded myself snapping it, slapping it on my plastic covered chair, both the seat and the legs, on my wooden table and side table, and on my suitcase. Initially, after selecting what sounded the best (I got my flatmate who plays GTA often to choose since I know that game has a lot of gun sounds, so i figured he'd be an "expert"), I felt that the sound was not enough, so I attempted making a laser sound in Ableton and adding it to the belt sound. But after adding the final clip to my gun, and playing the game, it turned out that because of the length of the clip and how often gunshots were fired, you couldn't hear the laser sound. I only realised this because the sound sounded so much like a gunshot, I thought I hadn't successfully removed the initial gunshot sound the game came with. It was then that I realised the gunshot was perfectly fine as it was and left it.
The above is the Logic project for the belt sound.