Monday, 29 January 2018

Week 18

Week 18:

HND Project


This week, I have decided to improve upon the “Health System” by incorporating a “Health Bar” in the HUD to better show how much damage that the Player takes from the Zombie AI.  To begin with, I had to create a new “Float” variable in the “Graph Event” that I named “MaxHP” and set its value to “100”. I then I went into the HUD that I created a few weeks ago and added a “Progress” bar.


Once I placed where I wanted it and filled in my desired colours, I then dragged a “Text” box onto the screen and left it blank. I then bind both the “Progress Bar” and the “Text” box. In the “Graph”, I created the following codes for the “Progress Bar” and the “Text” box. Below is how they appear.



After this, I went back into the “FirstPersonCharacter” graph and proceeded to remove the “Print Strings” in the “Health System” setup I had created earlier. I then quickly tested to see whether the results or not. To my satisfaction they had worked after a bit of configuration. 


After this, I noticed that the values still appear even after the Player dies and the continues values go down into minuses. As a result, I then decided to add a “Clamp” function to the piece of coding. This then stopped the “minus values” from happening and I also shortened the delay. 



Monday, 22 January 2018

Week 17

Week 17:


HND Project

This I am going to continue working on the “Health System”. This time I will be focusing on the Player’s Health. I shall also be creating a “Score System” of sorts to keep track of how many points the Zombie AI are worth. To start with, I proceeded to create a new “Float” variable named “HP” with a value of “100” in the Event Graph for the FirstPersonCharacter.



I then created the above the code with the “HP” variable. In effect, this piece of scripting tells the UE4 when the Player is taking damage and how much damage they are taking, and finally when the health meter reaches zero the Player will then have died and the whole level shall restart. 


I also had to edit and reconfigure the “Enemy Chases Player” coding in the Zombie AI’s “Event Graph” to allow the above coding to have any effect, like so. After this, I then when back into the “FirstPersonCharacter” and went to create the “Score System”. I did this by creating a new “Float” variable I named “Score” and then built a code around it, and added onto the “Gun” code to show the score.


After this, I then tested it out and then reconfigured the code after I realized I wasn’t getting the results that I wanted. For example, the “points” I received for destroying the Zombie AI. However, though, I noticed the score were simply multiplying everytime I hit the Zombie AI and thus, I realized I had to edit the code onto the Zombie AI’s health code after I had done this. You can see the improved code I wrote below.




Monday, 15 January 2018

Week 16

Week 16


HND Project

This week, I was preoccupied with a few of my assignments for my tutors James Tedder and Wayne Gallear. As such, I could unfortunately, not get much done with my Project this week. I did, however, played around and tinkered with it somewhat. As a result, I did manage to create a HUD crosshair for the Project. I began by looking for images online and found one in Google images.


After saving it and importing it into the Project, I then created a “Widget Blueprint” in the “Content Browser” under the “User Interface” section. Opening that up, I then dragged a “Image” box onto the screen and placed it in the middle of the screen, with the help of the “Anchor” tool. The then set the size to “64”x”64” and inserted the image of the Crosshair into the “Image” box.



I then realigned the “Image” box using the Alignment X and Y. Then, before I continued I went into the “Graph Event” of the “FirstPersonCharacter” and created a new “Function” named “CreateHUD”. Then made the following script for my Crosshair HUD to appear on the screen. “Create Hud” > “Create Hud Widget” > “Add To Viewport” in the “Create Hud” function and then in the Player’s “Event Graph”, I created a small blueprint that goes by “Event Begin Play” > ”Create Hud”. 






Monday, 8 January 2018

Week 15

Week 15

HND PROJECT

Last week, I managed to setup the game by creating a “Map”-like arena and reconfiguring the “First Person” blueprints to allow my Player to do things later. This week, I am going to create a Zombie AI that can follow the Player and giving the Zombie AI its own Health System. To start off, I had uploaded the “Third Person” blueprints into my games and began to create the Zombie AI.

 


Before I created my Zombie AI, I had to create an AI_Controller from the “New Blueprint” setting. Then afterwards, I created the Zombie AI from the “Character” in the “New Blueprint” setting and set its “Collisions” too “Generate Overlap (Tick)”, “Character Can Step Up” > “Yes” and “BlockAllDynamic”. Then, in the AI_Controller and Zombie AI’s “Event Graphs” I created a new script. This’ll allow the Zombie AI to chase the Player character non-stop until they are destroyed.

 

After I had done that, I then created a “Float” variable that I named “Enemy Health”. I then used this “Enemy Health” variable to improve upon the “Destroy Enemy AI” script and came up with this. In effect, this incorporates a very basic “Health System” onto the Zombie AI and allows them to last even longer then before. Now the Zombie AI can take 4-to5 hits from the Player.




Monday, 1 January 2018

Week 14

Week 14:

HND Project

This week, I began to work on our Project on Unreal Engine 4. I started by opening a “First Person” project on the “New Project” page and began to delete everything that was unneeded on the Map. The reason I decided to the use the “First Person” project is because me and Matthew agreed on making an FPS-type game. Additionally, the Blueprints would be easy to manipulate and edit.  


After I edited the Map, I decided to import some assets and materials from the "Third Person" project. I shall be creating a Zombie AI in the upcoming weeks. But first, I would need to edit and change the Blueprints for my Player character. As such, I went into the Blueprints and deleted everything I didn't need but kept the following; "Movement Input", "Stick Input", "Jump" and "Mouse Input".

  
I then went onto create the above blueprint that allows the player to fire their gun and fight back against the Zombie AI. The reason I did this is because this piece of coding will better with what I have planned for our Unreal Engine 4 project. In effect, the blueprint is relatively simple. It’ll allow the player to fire their weapon, as well as move it around, and it’ll also make a loud noise as well.