Monday, 21 May 2018

Week 33

This is the final post of the project. I worked on making a "You Win" text come up when you kill the last enemy to signal the end of the game.

This was pretty simple to do really, I just made a winner widget and chose where I wanted the text to come up. As you can see in the screenshot I made it in the centre of the screen.
I then added this simple code onto my spaghetti code to make it show up when the enemies alive counter hit 0.

And here you can see the text box working when the enemies alive hits 0.
I then decided after playing through the game, I wanted to move the start location to on top of the dried up waterfall so that is what I did.

Monday, 14 May 2018

Week 32

This week is the one from last week of me working on my project, What I wanted to do this week was make a kill counter, an enemies alive counter and a health pack so that when you run underneath the health sign it heals you back to full.

Lets start with the health package.

The first thing I did was design the health sign to go on to float in the air and make it bright enough so you spotted it and noticed it, I feel I did that pretty well.
The next thing I did was add the trigger box underneath it so that when you step under it it gives you 100 health back, Here is the code that does this, it is actually really really easy to do.

Next I moved on to the Kill counter and the Enemies Alive counter.
The first thing I did was choose where I wanted to position it on the screen, I chose just below top left, so it is easily visible to the player when they are playing. The next thing I will show you is the Spaghetti code that adds a kill to the counter upon a death of the enemy, and also takes one off the opponents alive counter.
And finally this is it in game, it starts with 67 alive as that is how many opponents there is on the map. What I plan to do next week to finish the project off is to make it so when the Enemies Alive goes to 0 it says "YOU WIN" on screen.

Monday, 7 May 2018

Week 31

This week I moved on to adding the other monsters around the world.

They are all set up the exact same was at the bear so I wont go through the code this time as it is just what you have seen from before.

The monsters I added this time were spiders, in the ruins area. (Although they unfortunately cant navigate it too well.) I added Wolves into the open area around the other side of the map, in the forest, and around the volcano.

I made a new "castle" sort of building which had lots of really evil worms in there that will try and eat you whenever you go near them.

I finally added in the Boss, the only thing different between him and the other monsters is that he has 200 HP instead of only 50. Meaning it takes 4x the amount of shots to kill him.

Below is a screenshot if each of the monsters in their new homes.





Monday, 30 April 2018

Week 30

This week I did a lot of work on making my monsters for the game. What I plan on doing is having a different monster in each "section" for instance we will have a bear in the forest, spiders in the ruins and other animals for the other areas which I haven't thought of just yet.

The Monster models have come from the InfinityBlade pack and come with some sort of animation, but not all of them. unfortunately there is no attack animation on the creatures but they do have a walk animation.

The way the monsters are set up is so that they can free roam and then if you come in a certain distance of them they will lock on, I will provide a YouTube video showing this for my bear in this blog post at the end.

Here is the code for my monster, I plan on using the same code for all of my blueprints but changing the actual monster itself, except for the Boss where it will have increased health.

As you can see in the screen shots, the very top of the code is the code for the bear to take damage, the middle section is its random movement around the map, and then the last part of the code is the lock on to the player.

Now I will show you a video of the bear randomly moving, locking on to me and then me killing it, unfortunately there is no attack damage on the bear yet, but I will look into this soon.

Monday, 23 April 2018

Week 29

This week I worked on sorting out the health bar for the character. I followed this YouTube video here 

I will screenshot the below steps to give a more visual view of how I did it. I started off by creating the health bar widget, this basically is where the position of the health bar will be on screen.
The next thing I had to do was set up the Variables needed to get all of the health bar working and displaying the correct health, here is a screenshot of all the different variables I have used, bare in mind although I have a "regen" variable I have not added any health regen in as I wanted to make this game hard.
The next thing I added to add in was the function to make the health bar update in real time. and also to display the graphic in the health bar widget.
And finally this is the code that connects the health bar to the First Person Player.
The white line connecting to the "create health bar widget" section is the Event BeginPlay tab which is what happens when the game starts.



Monday, 16 April 2018

Week 28

This week I have made it so the Gun bullets will destroy on impact, This took a lot of brain ache to figure out how to do it so I will show you all the code I have done to make it destroy on impact and also to make the bullets grey.

This code here is what makes the ammunition destroy on impact, this is to stop having to many entities on the ground which will cause performance issues. I simply added the "DestroyActor" tab and connect the "Event Hit" to it.

While also in this screen for the "FirstPersonProjectile" I changed the size of the ball to be half the size in the scale section to make it more of a "bullet" if you like.
The next thing I did was set the damage of the bullet so that when it hits something with health it will take that amount off of the target, I have set the damage number to be 5, and most of the opponents will have 20 health, with the bigger opponents to have up to 100.
This here is the code to make the damage ratios apply.

Monday, 9 April 2018

Week 27

After choosing to change the way my project was going last week, this week I decided to change the project from 3rd person to 1st person. I did this by Simply creating a new project in "First person mode" and then importing my map over and slotted it into the Maps folder.
I have also now added the spawn point into the actual house so when I click play I spawn in the house, and you will see the gun that you spawn with, in which I need to change the bullet off later down the line.
Here you can see the spawn point, you can look at the window and see the wonderful mountain in the background as well as some of the forest in the marshlands.