Monday, March 18, 2019

Week 26 + 27

Week 26 + 27:

Creating An Enemy NPC - Part 6

Due to working on working on the Enemy NPC for the last few weeks and working on my other course’s assignments, I have decided I’ll give this one a few more weeks and then move onto the other things I want to add into my Unity Week. This week, I shall be adding the “Death Animation” for when the “Monster” catches the “Player” character.


In order to do this, I began by going into the “Monster” script and added the following coding as seen above in the following place. Afterwards, I then went to “Create” > “Camera” and then placed the “Camera” inside of the “Monster”.  I then renamed it from “Camera” to “DeathCam”. I then re-positioned the first-person camera to the “Monster”.


With the “DeathCam” selected, I then went into “Game Object” > “Align With View” and that moved the “Death Camera” to the exact same position as our viewer. After that, in the “Depth” options I gave the “FirstPersonCharacter” a depth of “0” and the “DeathCam” a depth of “1”, so that it’s now in front of it and that is overwrites it now.


I then grabbed the “Spotlight” from “FirstPersonCharacter” and then I duplicated it, before placing it into “Monster”. I then clicked the “Reset” button for the duplicated “Spotlight. In the “DeathCam”, I then edited the “Clipping Planes” to “0.1” because it’ll be animated soon. Once I finished that, I then clicked “Create” and created a new “Empty”.


Afterwards, I then renamed this “CamPos”. I then clicked on the “DeathCam” and then the “Gear” button, and then clicked on the “Copy Component” option. Then in “CamPos”, I clicked the “Gear” button and then I clicked on “Paste Component Values”. Now its position is exactly the same as the positions that the “DeathCam” positions has.


For this animation, I now want the camera to pan into the face of the “Monster” when they have caught the “Player”. To do this, I began by disabling the “DeathCam” and then on the “Monster” I dragged the “DeathCam” onto it. After this, I then went into the “FirstPersonCharacter” script and then I copied the following line. And then going into the “Monster” script I added the following lines.



Basically, this means when the "Player" gets caught they'll be disabled and be unable to move when the "Monster" catches them, and the "Camera" then pans around to them. Additionally, when the "Player" is caught the "Monster" will also growl again but in a lower pitch this around and then the game will reset afterwards, using the “Kill” script in “Monster”.


Monday, March 11, 2019

Week 25

Week 25:

Creating An Enemy NPC - Part 5

This week, I am continuing one from Part 4 of my “Creating An Enemy” mini project for my Unity Game. This week, I shall now be adding animation to the “Monster” characters for when they attack the “Player” character. Before I do this, I ran into a few problems and realised I forgot to create a script for the “Player” to interact with the “Monster” script. So, as usual, I went into the “Script” folder and then added a new C# Script called “Player”.


With that done, the “Player” and “Monster” scripts can now interact with one another without any issues for the time being. Another thing I would like to add before I animate the “Kill Animation” is having the “Monster” roar upon seeing the “Player” and then giving chase”. Another thing I would like to add before I animate the “Kill Animation” is having the “Monster” roar upon seeing the “Player” and then giving chase”.


In order to do this, I clicked on the “Monster” > “Zombear” then clicked on “Add Component” and then I clicked on “Audio” > “Audio Source”. With the new “Audio Source” option, I then clicked on the “Add” option and picked out “Hellephant Death” from the Survival Shooter Kit.  I then clicked the “Not Play On Awake” option and following this, I then edited the “Monster” script to include this and now the “Monster” will roar at “Player”.


And:




Week 34

Week 34: Critical Reflection: Conclusion: Over the course of this college year, I have managed to design, create and test my Horror-ba...