Post 11: Combo Attacks; Part 1

Tonight I jumped on to getting Bob armed and started implementing attacking animations / sounds. I started by grabbing a starter model kit off the Epic Store, which contained a two handed sword. Although this will not be the sword I will end up using, it’s a good start as I want the player to use a customisable Claymore / Bastard sword.

My next step was to create two sockets in the character skeleton. One of these was on the characters back and the other in the right hand of the bone rig. From there, I created a function that triggers when the player pushes the ‘1’ key, effectively equipping and unequipping the sword by attaching it to either of the sockets and smoothing it out with a vector move call to.

I then grabbed an animation from that could serve as either an equipping or unequipping the weapon. Unfortunately it’s only really useful as a single sword animation, but it will do for now.

From there I delayed out the socket attached to coincide with when the right hand in the animation was closest to the hilt and the vector move takes care of the rest.

Finally, I localised the equip animation to the arms of the character so that if they were running and they wanted to equip the sword, their legs wouldn’t go crazy.

Next I started on the attacking and combo animations.

First, I setup the left mouse button as an input. Next I setup a function that would a) auto equip the sword if it already weren’t equipped and b) set a selection that would occur depending on a integer that would increase when the player clicked in succession. This selector contains three different attack animations. It kind of works, but still needs a bit of refining. I’ll double back later.

Finally, I added sound cues in the animations for grunts and sword swings that would randomly pick from a variety.

The audio, no doubt will be replaced, but this is a problem for a later date.

I’ll upload a video of the WIP when I refine it a little more. For now, here’s some screen shots.