Self Study 4
Week 5's self study involves tying up some stuff in the scene we made in the previous weeks with some extra functionality and making it (kind of) a playable game! After downloading the provided scripts I got to setting everything up.
Enemy Spawns
The previous method for spawning enemies of clicking to spawn was obviously very clunky and wouldn't fare when making an actual game. Who would spawn their own enemies? So using the provided scripts, I set up spawn points around the map which constantly create enemies to hunt down the player.
Enemy Interactions
All enemies used to do is run up to the player and push them around. Now with using the interaction script and player health script, once the player collides with an enemy they take damage, the health UI of the player decreases and the enemy disappears.
Health Packs
Now that the player can take damage, they should also be able to heal. Using some more of the provided scripts with some minor editing, there are now green cubes scattered around the map that the player can pick up to restore their health (currently there's no cap on hp).
Loss Condition
Health can be lost but now the player can drop to zero which usually ends the game. So now, once the players health drops below zero I have made it that the game ends by destroying the player. So that the player doesn't end with a blank screen I simply added a secondary camera with a sky view of the terrain showing that the game is over.
That's about it, see you next week.
KIT 207 Portfolio
More posts
- Self Study 5Apr 11, 2024
- Game ConceptsApr 01, 2024
- Tutorial 3Mar 24, 2024
- Self Study 3Mar 18, 2024
- Tutorial 2Mar 16, 2024
- Self Study 2Mar 13, 2024
- Tutorial 1Mar 08, 2024
- Self Study 1Mar 04, 2024
Leave a comment
Log in with itch.io to leave a comment.