Thursday, 14 April 2016

Class 35 - Working Armour

Post 118

Working Armour
Today I started to work on the implementation of working armour in my game. Basically it is just like having a secondary health bar that changes the amount of damage you take when its above 0. The code behind it along with the overall concept is simple. It involved going into a lot of code and changing some basic statements to be a little different by adding in extra options and "If" statements. But for others it was more simple. Like how I didn't want the player to bleed when they had armour, I achieved this by just having a step event like this, "
If Armour (is above 0)
{  Bleed = False }
This just stops the bleed before it does anything to your health or creates the bleed effect.

The biggest problem I faced well creating the armour was the sound it plays when the armour itself breaks. Making a armour being hit sound was fairly simple, but making a different sound play once and only once when the armour dropped to 0 was hard.

After a couple of stressful minutes of code I managed to get it to work. Currently I don't have an actual dedicated sound to the armour being broken so I just used the shield thud sound.
Tomorrow I will work on making hits feel more responsive and impact-full.

No comments:

Post a Comment