Update 15 – New boss, grab mechanics, and bullet impact
The grab is a simple idea, but I spent some time making a new system for it so I can easily add grab moves to enemies and bosses. I just attach this script to enemies, and get the settings right. Most of the complicated stuff is handled internally, or by the animations.
Here I am creating some animation events that call the AnimDamage() function. Thanks to Unity’s new animation system, I can do this visually. This is also what I do now to detect regular melee hits.
And here are the new melee detection boxes. The green boxes on the monster are hitboxes, but the ones in front of him are for regular melee, and the impaling grab attack. This lets me tweak them visually, and I can even pause the game as the monster attacks and line them up perfectly.
If the player is colliding with one of these boxes when the monster attacks, they either get damaged or grabbed, depending on the attack. Usually for bosses, I detect hits using raytraces, but for enemies that aren’t so much bigger than you, this system is easier and doesn’t slow the game down nearly as much.
And here’s how easy it is to set up in the code!
There’s a TON of behind the scenes stuff going on there. The ActionState class takes care of most of the complexity, allowing me to add new attacks efficiently.
Eventually I want to make it so monsters can throw you. I also need to make different player animations depending on whether you’re being grabbed or impaled, and maybe some reaction animations for taking damage.
The idea is to let the player get really beat up. I’ve been noticing more and more how many “getting hurt” animations there are in Dark Souls. It reinforces the idea that you’re just a small human in a terrible, hostile world, and makes victory over huge bosses all the sweeter.
I’m also trying to make the game more intense and over-the-top. Flying sparks help a lot 😀
The Eviscerator still needs a lot of work, but I updated his upper materials. His feet still have temporary materials, and are completely messed up.
Here’s how the Eviscerator looks with hitboxes:
Have a great week!! 😀
Filed under: Animation, Combat, Monsters | Leave a Comment