Having a Sword Stick to an Enemy

Tester115

Member
Hello,

I had an idea for a new ability that I would like to work towards implementing, but I am afraid that I do not know exactly where to start within the events system. Basically, I would like to create a new type of Special Attack using a stab animation that I already have imported into a project. When this special attack is activated, I want the first person player to stab a sword forward towards an enemy. Depending on which part of the enemy is stabbed, I want the sword to stick to (parented under the bone) the specific part of the body that got stabbed by the sword and unequip/remove it from the player's inventory (kinda like an arrow would). Does anyone know how I could add an ability like this?
 
When the knife stabs the enemy the OnObjectimpact event will be sent. You can use this event to decide which part the body hit and then run your logic from there.

Good luck!
 
When the knife stabs the enemy the OnObjectimpact event will be sent. You can use this event to decide which part the body hit and then run your logic from there.

Good luck!
Thanks! Is the special melee attack that requires a button combination to use handled by it's own ability or is it handled somewhere else in the character controller?

Edit:(I solved an issue with the impact event handler, I was using an older version of the controller that didn't have an override for 6 parameters like in the example.)
 
Last edited:
You can use a custom ability starter:

 
You can use a custom ability starter:

Alright, one last question. What command/code do I need to use to check and see if a specific ability is active?

Edit: Nevermind! I figured out how to do that while I was trying to get the other aspects of this ability to work.
I am now very close to getting this ability finished.
 
Last edited:
Top