Friday, 1 April 2016

Class 26 - Health Pots

Post 109

Health Pots
Today I decided to attempt to make something that will heal the player. I first started to play with the idea of the classic health regeneration. However having health regeneration seemed too easy and doesn't really fit my game. So I set out to make random health pot drops. First I started by making the health pot itself. My design is kind of a cliche health pot look, but its hard to be extremely creative when the main character is around 10 pixels tall and 5 pixels wide.


I ended up with this very basic design. The second image is supposed to be when the player can pick up the health pot. This makes it easier for the player to understand that they can pick up the health pot.


The above code tells my health pot everything it needs to know. When the player is touching the health pot it changes to the yellow outlined version. When the player activates the health pot it heals them. But if the health pot isn't used it slowly fades away and destroys itself. Also if the player already has full HP they wont be able to drink the health pot, kind of wasteful. But who cares.

The next thing I need to do is make it so the health pots actually drop from enemies. But I will probably do that tomorrow along with something else. It should be relatively easy to create a random drop chance as well, which is what I defiantly want.

No comments:

Post a Comment