Monday, 11 April 2016

Class 32 - Picking Up Health Pots

Post 115

Picking Up Health Pots
Today I wanted to start making a simple system to allow the player to pick up health pots and save them rather then just using them instantly whenever they pick them up. The idea behind this mechanic is pretty simple. Instead of having the health pot add health upon being picked up, it just simply increase the variable "Healthpot_count". When the variable "healthpot_count" is above 0 the game will allow you to press the health pot button and restore some health, along with removing one of the health pots. This gives off the illusion that you actually obtained something and used it, but instead all you did was increase some numbers and hit a button to reduce some other numbers. Pretty nifty.
Now along with this I had to make some balancing changes. This is because there is no limit on how high the "healthpot_count" variable can go. So you can pick up 100 health pots and just spam them well you are being attacked and become invincible. So that is obviously not something I want in the game. So in the future I would like to add an animation for drinking the potion and a cool down, so you can't spam them. But for now a simple limit on how many you can carry will suffice. Currently I set the limit at three, and might possibly have an option to increase your limit in the future as an upgrade. I also made sure that if you have reached the limit of potions you can carry and you try to pick up more it wont let you. This stops the extra potions from vanishing into thin air when you try to pick them up. It also gives the player a chance to use one of their own potions freeing up some space so they can pick the new one up.

Next Class I will work on possibly adding in passive effects, so like bleed damage, or poison damage.
This will give enemies variety in the future, and also might be used as upgrades for the players weapons.

No comments:

Post a Comment