One animation sequence - Two players?

Hi there fellas!

We're wanting to improve our melee portion of our game and we are thus interested in studying how one can link two characters to eachother in the same animation sequence.

I believe Deceit is doing it when someone gets killed by the bad guy (or even the stock animations in the engine with the neck snapping when you melee somone from behind).

In short, how do we go about creating a system where a player stabs another player with a sword or a bayonet. This event is then to trigger two connected animations. One on the stabbing player where he pulls out his weapon from the other player and one for the victim where he either grabs at the weapon or wound before falling over.

As you can tell from the above example it is quite important that we can utilize a sort of animation position lock system between the two players as they need to react to eachothers actions in a very detailed level.

Any tips for a direction for us where we can learn more about this, to us, completely unexplored "glory kill" animations between two players would be greatly appreciated.

Also sorry for my lack of correct terms - I am not an animator. :)

- Trusty

Re: One animation sequence - Two players?

The term in cryengine is "enslavement".
If you read Mannequin's documentations, you will encounter words "Scope" and "ScopeContext".
I don't exactly remember, but you can have multiple contexts that animations play on.
You can have a main context, for the character's animations. And you can have a "Slave" context, for slave's animations.
You can set a context with a code like this:

Code: Select all

pActionController->SetScopeContext(uint32 scopeContextID, IEntity& entity, ICharacterInstance* pCharacter, const IAnimationDatabase* animDatabase);
You can set this at any time. You can change it, whenever you want.
The IActionController instance (pActionController) belongs to an entity. When ever you want to play an animation, you have to send a request to this "action controller".
Do you see the args after "scopeContextID" in the arg list? Those args specify, on which character, the animations play on.
You can set information of "main" context to the entity, and then set information of "slave" context, to the character you want to play sync animations on.
Whenever you send a request to action controller, if the request involves playing an animation on slave scope context, slave animations are played on the enslaved character.

The official docs on Mannequin and fps and tps templates, are two good learning resources.

Who is online

Users browsing this forum: No registered users and 1 guest