You ever had a title for a post so great you had to write code to make it happen?
As you may have noticed in my recent POST, once the zombies have infested enough buildings they become quite the force to have to deal with for the human player. Up until this point the human player had no way to slow down the zombie horde other than picking zombies off one by one, and that’s not really a decent strategy. The human player needed some way to destroy the spawners that the zombies are using. Enter the dynamite stick!
While more difficult to find, the dynamite stick will allow players to level buildings quickly. Destroyed buildings don’t spawn zombies but they are also won’t spawn weapons or power-ups anymore for the human player to loot, so deciding which buildings to destroy becomes a tactical choice.
Dynamite is also to first weapon in the game to use the secondary fire button. Primary fire will just throw the unlit stick allowing the player to shoot it with any other weapon to detonate it. The secondary fire lights the fuse and begins a countdown to the explosion.
While this does not look like much I’m kind of proud of it because it’s my first foray into destructive meshes and animation. Obviously there is still a ton of work to do on this. The dynamite is way too overpowered, the hand animation has something weird going on with its fingers and the destroyed houses look awful but it’s a step in the right direction.