I wanted to finish some more on the health system before I posted just to have more pictures of the code and the game. So I added more UI to the game allowing for some nice improvements to the aiming by adding a small reticle to allow players to see where the arrows will spawn. I added a health system to the game which so far has been working fine and will display how much health the player has after taking damage. It was a little tricky to get working at first, but it uses functions to check how much damage the player has taken from the max amount of health which is only 100. I will also a similar scoring system when playing just with the target practice mode. The health currently just goes down whatever increment I plug in for the game controller, but eventually it will evolve into a damage float which will depend on where the player has hit the other player on the body which will use hit box colliders to check if they player hit the head, torso, or arms and then apply the correct amount of damage appropriately. The player will then be able to look at the bottom left of their screen and check their health, as well as check the other players health when it is not their turn.
Image 1 - is the code I created for the game system
Image 2 - is the code for the health system which has the functions for removing health and checking the health
Image 3 - is the new targets with colliders added on to allow the arrows to stick.
Image 4 - is an image shown to demonstrate the new ui, the bottom left is a health bar and the yellow reticle is in the center of the screen where an arrow will spawn
 |
| 1 |
 |
| 2 |
 |
| 3 |
 |
4
|
Comments
Post a Comment