Well if you know how to use binary countoffs and single switch randomization, you can rig up a pretty kick ass VHP system with ease.
You could first randomize the hit from one unit to another, and then depending on the amount of the DC that is landed on during randomization, you then divide the base amount of damage from a unit (which you decide the amount of via death counts) by a certain factor with a binary countoff. The resulting quotient could then be the amount of DC's (health) subtracted from the unit being attacked. You could have all this done within a single trigger cycle too. You can also reuse your binary countoffs for all players, to minimize triggering done by the mapper.
Here's an example:
Player 1 tries to hit a Weak Zombie.
Player 1 rolls an attack check with single switch randomization. Let's say the DC parameters for this role are between 0-100. Every increment of DCs (the amount of the increment decided on by the mapper) for this roll will represent a different quality of a successful hit, or even complete miss.
So this means that if the player rolls 0-9 deaths, the hit completely misses. If the player rolls from 10-49 deaths, his base attack amount will be divide by 20. If he rolls from 50-89 deaths, his base attack amount will be divide by 16. If he rolls from 90-100, then his base attack amount will be divided by 14.
Lets say Player 1's unit currently has a base attack damage of 100. He can now inflict either 0 damage (miss), 5 damage, 6 damage, or 7 damage.
You can set up more division amounts if you want, and you can change the base attack amount any way you want for any unit. You can also specify which units are applied to which type of divisions of base attacks.
Then just use a simple system for representing HP with DCs.
But.. If you want to have hordes of zombies, it will get a bit tedious representing VHP for multiple enemies at once. You could try using 1x1 pixel locations constantly being moved over enemies that spawn near the players to employ VHP. You could designate the zergling to represent hit points of a zombie (burrowed), and then cycle through and center locations onto the zerglings every trigger cycle, with use of two different computer types -this way you don't have to mess with giving the actual zombie to different computer players every trigger cycle in order to center locations. Once the locations are set, they should be moved to the zergling that they are currently over as to keep the same locations over their same zombies. From here, you can just have different groups of locations represent different types of zombies; locations 0-9 be weak zombies, 10-19 be normal zombies, 20-29 be strong, etc. Make sure these locations are 1x1 pixel width, so that the locations don't "jump" from one unit to another.
Maybe mix in a couple types of zombies that are always 1 hit kills (so you can have a hordish look to the amounts of enemies without bothering to apply VHP to these 1 hit kill zombies).
Lemme know if any of this was explained poorly.
Post has been edited 2 time(s), last time on Dec 13 2009, 10:34 pm by CecilSunkure. Reason: Made easier to understand.
None.