Unity Tutorial 05
Hello and welcome to my blog on Jimmy Vegas tutorials
In episode 9 I learned how to implement a sky box and how to
manipulate it so I can change the whole setting through lighting, colour and
even attach the lighting to the character and turn down the settings on the
normal lighting to 0 and give sort of a dark creepy vibe like the game Slender: The Eight Pages where you walk around with a torch, I guess in
some way you could code it so the light is only operational when you press a
key.
Next, I learned how to implement a wind zone which created a more
realistic feel to the trees, grass however has its own wind zone so it's unaffected
by it. next I learned how to attach it to a character so you could make it only
work when the character is near them, I could see this being good in some games
as it would mean less lag input due to not every tree in the game moving, next
there was a way to make it so the grass moved within a certain wind zone of say
5 yards so you could make it look as if you was walking through the grass.
In the next part i made a tree in which i added a collision box
beside the object as a sperate object, we then added an axe inside the box and then we
then set it with the script the same as the gem so when we pressed E it would
take the axe, we then attached the script to the box and the axe which was a
2nd axe would be destroyed in the script and the Collision box and text would be
set to false and blank this would remove the box and axe, then in the script we
set our original axe to true and then we had out axe back.
In the next part we made a raw image and set it to a black screen
by setting it to 255 on the alpha scale, I then started a record scene in which
I added a 255 value at 0 frame and then changed the alpha to 0 at the 90th
frame because there is 60 frames set in a second and I wanted to add in a 1.5
second fade in, we then set a game object and attached a script to it and then
the raw image fade into to the game object, the script set it to wait 1.6
seconds and then set it to false so it wouldn’t happen again.
In this next part I did some debugging, I removed the axe showing
through objects, we fixed this by changing the layer back to default, next we
needed to remove the axe from swinging and we did this by adding another if
statement to say if holding axe then you can swing the axe. this also removed
the sounds and the axe in your hand until you pick it up. next we made a fade
out which was basically the reverse of the fade in, but we didn’t add a script
because were not using it now.
Next, we added in bushes like you would the trees and made a few
around the area, we had to change the brush sizes also. after this we added in
a house and set its values we then rotated it, we changed the metallic of the
object and added in some grayscale on then normal map then and added in a light
to give it a more glossy shine , next tutorial we will learn how to make a
scene or a space be eight the house to go inside the house
all and all I loved this tutorial and I can see the game coming
together, I hope to add enemies and naps and hopefully make the axe hit them, as
well as adding in interactions with naps and chests etc.
Comments
Post a Comment