DEV BLOG 13
Trees, Stones and Bushes
Trees
I added more varieties of trees, all of which are still harvestable. This was to make it look more realistic. Instead of every tree you come across being the same, type, size, shape, there is now 3 variations of tree and numerous different sizes of them also.
Pine Tree
Leave Tree
Fur Tree
I also added a wood chopping sound effect to them so that when a line trace hits it, it will play a random sound from several sfx I set up using a sound cue.
Stones
As well as more trees I added a Stone actor into the game. the functionality is exactly the same as the tree instead this time instead of hitting it and getting wood, you get stone. The stone has more life than the trees so you can hit it more times before it gets destroyed however you get fewer stone than you do wood per hit.
Again when the rock is hit a random sound from a number of different stone hit sfx will be played.
Bushes
These are based off my pickup actors. I had to duplicate and alter the scripting to get this to work. it works just like my pickup actors in the sense that you walk up to it and when prompted press e and you pick it up. However I wanted a trigger box to play random bush rustling sounds when you walk through them and then another when you pick it up. I couldn't do this with the current system I had created so had to make a seperate one for this. Now with a working trigger box I got it to play the random bush rustling when overlapped and then when you actually pick it up, it plays one distinct bush rustle sound.
Here is an example of the trees, stones and bushes below.
Physical Materials
I also set up some physics based materials. My character sends a line trace from itself directly down in the y axis. Whatever that line trace hits will determine the sound played for footsteps. I only set 4 up. They were grass, Dirt, sand and stone and I haven't actually applied the dirt and sand materials anywhere due to the materials breaking my build.
Once it has set the sound to be played then it has triggers within the animation blueprint for the left and right foot. Once that hits the ground a footstep sound is then played.
Any material can then be assigned as a physical material. If the character then walks on it, the appropriate footstep sound is made.
Here is a video example of the character walking from grass to stone and then back again.
Random Sound Cue Setup
This is an example of how i set up my random sound cues. This example is for my wood chopping. When the cue is called a random sound from the 9 on the left is selected, it is then put through a modulator which gives the sound random volumes and pitches before it is then played.
My trees, stones, bushes and footstep sounds are all set up this way to give it variety.
Drinkable Water
I added a lake to my scene with the purpose of making it drinkable. When you are submerged in the water then by pressing "E" you can drink the water which adds to your thirst bar. I wanted to add a widget when it was drinkable but It wouldn't show on screen very well so left it out.
Here is an example.