Tuesday, 16 April 2013

Zombie Health Systems

Francis programming

This week I've managed to implement everything needed for zombie damage. Up until this point zombies have taken one hit and died, now they can take a number of hits depending on where they've been hit and with which weapon. I've just added tagged hit boxes to the zombie prefab seen below.
Instead of the gun script simply deleting any ray cast hit tagged as "zomb" it now calls a health script, placed on each zombie, with the tag of the hit box the ray has passed through.

Hits on the arms, legs or head will decrease the health value of the arm, leg or head hit and the main health pool, while hits on the torso will only decrease the the value of the main health pool. Any health pool being depleted will result in the zombie dying. The individual health pools of the arms legs and head are all smaller than the main health pool, so shooting these is more effective. It also damages the main health just so every hit counts towards the death of the zombie. Each limb has individual health to facilitate the dismemberment mechanic which will hopefully get implemented eventually.


--------------------◄|~☼~|►--------------------


Since last post I have also implemented, different bullet damage for each gun and penetration for one of the guns. Our railgun is now able to hit more than one zombie per shot. An unanticipated benefit of the penetration is that, not only can multiple zombies be hit, but multiple hit boxes in each zombie can be hit. Worst case scenario, this might result in the zombie taking four times the normal bullet damage, to the main health pool, if the ray passes through both arm hit boxes the torso hit box and the head(with each arm and the head subtracting bullet damage from their individual health pools and the main health pool).

I'm not sure this is entirely a bad thing. It certainly shouldn't be hard to program away, but at the same time, if balanced properly it could turn into a cool mechanic. At the very least it merits further discussion.



--------------------◄|~☼~|►--------------------


So that just leaves the score system, balancing and tweaking.

Francis Out

No comments:

Post a Comment