How to code Doom 4 Finishing moves with interactive animations

I want to be able to have finishing moves in first person that have a short animation showing the death of the thing your killing much like in the doom 4 game play trailer. i have little knowledge of getting interactions done, for example pressing e to open and shut a door… but i do not no how to connect an animation of a hand coming out and opening the door.

The doom 4 example is just to give an idea of what I’m trying to do. i want to go up to an object for example like a helmet, press “E” and have actual hands pick it up and put it on, i DO NOT want to go up to the helmet and press “E” and the item just disappears from sight, going into the inventory.

How do you set up interactions with animations?! any info on tutorials, forums, or even different words i could be using to search for what it is im thinking. would be greatly appreciated!! I hope there is someone out there that can help!!!

i know it will be hard, or at least harder then most things that do get questioned on this site. But I"m fairly confident in what i can achieve and getting this to work in the utmost, way i envision it. Your reply actually already helped me to an extent with knowing a couple more things that need to be done, actors being rotated, locations.

If i can make it so a character opens a door and you see the characters hand turn the door ■■■ and push or pull it open. the possibilities are endless.

really thank you for the reply DDemon!!

What you want to do is kinda hard, mostly because its goes around animation, not only that you need to play with actors rotation and location, and camera as well. Its really hard to do and I suggest to stick with the old “poof hat teleported to my head” style.

Here is a link to the game play footage i mentioned in case someone hasn't seen it. Every time there is a (ill just call them "mini cut scene") between two interacting objects, for example the demons, or when he prys open a door and you actually see his hands come up and open it. Even when he picks up the shotgun, the object doesn't just appear in his hands or in the inventory he actually picks it up, loads it, and you walk off. when there is a button and he attempts to press it, his hand comes out and touches it, triggers the sound que and doesn't open because of the wrong finger prints.

Thanks again!

I’m not going to code this for you but… here is what you need to do in pseudo-code.

‘How do I pick up objects in the world and attach them to my own body?’

  1. You’ll want to create sockets and then use iterators or line tracing for the body part you want to pick up to attach it to your own socket.

This can be achieved using ‘MeshName’ / Actor → AttachSocketName(“SocketName”);

  1. From here you can trigger a boolean that when you enter into something (and hit a button) then it’ll play an animation and detatch with physics / or custom animations at the FVector Location such as a sliding animation.

" I want to be able to have finishing moves in first person that have a short animation"

  1. When an enemy is low on HP or you have a weapon that can perform these on every hit then move the camera. DDemon was right that this one will be a little tricky. So in Maya just setup two skeletons that play off of eachother.

  2. In the game just call both montages in c++. This one will require abit of research to pull off. If you want to play animations through code don’t expect Bone Blending. I tried it and didn’t make much progress I had to switch to anim blueprints for that but for some montages I still play them manually in code depending on what I need and which makes sense.

You’ll simply want to call a function on both the character and the NPC to play the proper montage. So for example…

PlayKIllAnim(); // Player
NPC->PlayKillAnim(); // Cast to the NPC. Line Tracing is going to be your friend here.

In short… try taking a look at some of my questions I have asked on here. I spent a good time worrying about animations with C++ and other various need to know basics. Eventually you’ll figure it out… and as a good professor once instructed me.

“Don’t try to tackle a big problem at once. Break it down into smaller pieces and do it little by little.” - This bit of wisdom should help you in your endeavors. Good luck! :slight_smile: