Author: Nathan Wathingira
Posted on 4/25/2025
This week I decided to tackle the beginning of our combat systems it was a light week for me. Due to some time constraints in the middle of the week. I started off creating the Health Component for our game that will be used for both player and enemy. I also created the projectile one of our weapons would be using. A simple Health Component shouldn't cause an issue but it did. When the HUD was created the Health Component was also initialized but in the Base Player class and not the Paper Base Character. This causes small issues with having to keep creating the Component for each enemy type or other entity in our game since it was not in Paper Base Character. For some reason fixing this issue by putting the creation of the HC in the Base Character class would leave the player with no health stopping all actions.
After doing a lot of error checking, debugging and conversing within the group I found that the HC was showing 0 health when in Paper Base Character and the correct amount when in Base Player, which shouldn't be the case. It was only until Corey found that there were 2 Base Players for some reason and there was another HC being made there. It has now been removed and our player and enemies have proper health pools now. I can now finally move onto implemented the weapons properly.
Attached is an image of the health bar on the hud working properly and the Health component in the right constructor.
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.