Simple Game Self Study 4


I tried to make the enemies follow the player with no success. I ended up using some code I wrote in Games Fundamentals to get the enemies to follow the player. This code was written for a 2D game so I just removed all the references to 2D and then it worked. I adjusted some scripts so that the players health would go down when the enemy hit them and up when the player hit the health pack. However, when I ran the game the health didn't appear to go down. After, a lot of trial and error, I worked out the problem. It turned out I had set the health to something else but had not updated the UI that tells you the players health. I made sure the player was destroyed when their health hit 0.

This gif shows the game starting. It shows the player getting the health pack and having their health increase. Then it shows the enemies chasing the player. It shows the player loses health to the enemies. It also shows that the enemy dies if it hits the player. Finally it shows the game ending when the players health = 0.  

The player is the white capsule, the enemies are the black cubes and the health pack is the pink cylinder. 

Leave a comment

Log in with itch.io to leave a comment.