Jump to content

Old Takedown Resource?


marauder2k9

Recommended Posts

Somewhere there may have been a post, but I do not know the content of all the posts on the old forum out of my head right now ;)

Have you searched everything extensively already? I have a backup from the resources section, but I have not seen any resource regarding takedowns.

Link to comment
Share on other sites

ive went through all of bryces forum posts and blogs, he talks extensively about it and about what he did but he doesnt explain how he did it. I know how to find out the position of one player relative to another but i dont know how to make both players play the right animation, i have an idea of how to do it but it seems too clunky to me: the way i was thinking it would need to be done would be check animation of the attacking player and send to the server then the server sends an anim prefix with death to the victim player but i dont know whether or not that would be correct

Link to comment
Share on other sites

Just clear your head and think about the easiest way to do it from scratch.


I'm thinking about the new Doom game for example, they solved this issue in their melee attacks by just sucking the player onto the other player when a melee finishing move was pressed, I saw it when some reviewer made fun of it, so it may be stupid but it works.


A takedown would work similar, implement a check if the player is close enough and when the takedown button is pressed, just suck both players into the correct position and then play the according animation.

Link to comment
Share on other sites

yeah i know about fixing the positions that's not the problem, the problem is how to get both players to play the correct animation. For example if attacking player is coming from the left:


Attacking players animation would be: TakeLeftAtt


Victim players animation would be: TakeLeftVic


there will be different animations for when the victim is crouched or when the attacker is crouched.


Im trying to figure out the best way to tell the server to tell the victim player what animation to play in relation to the attacker

Link to comment
Share on other sites

I would not bother with it and just suck the player into the right position and always play the same animation, other games do it that way as well and they have far bigger budgets and even they did not bother with it.

I would make a takedown from behind animation and always use that, no metter where you come from, just reset the current position and go into take down from behind, done.

Link to comment
Share on other sites

i think maybe you are gettin confused at my question. The position part i know how to do and have it ready. what i need is a way to tell the other player to play an animation that goes with the takedown animation. so if the attacking player plays takedownattack1 the victim will play takedownvictim1. This is the way its done in most games as far as i am aware, both animations are separate and the characters then play their respective animation due to what happens in game. Battlefield 3 does this, one animation for the attacker a separate animation for the victim both start at the same time and play in sync until the takedown is finished. I know about the moving the players to the correct position and all that its just getting them to play the animation that fits with the takedown that i cant figure out properly.

Link to comment
Share on other sites

if u watch this video of watchdogs takedowns it will illustrate what i mean, the players character initiates the takedown, there are a few different types of takedowns sometimes depending on what weapon is equipped and what position the player is relative to the victim. But as u can see the victim plays an animation that goes with the takedown. I was looking for a good way to do that, select a takedown at random and have the victim character play the takedown that goes with it


bdbO_-o-_Eg

Link to comment
Share on other sites

if u watch this video of watchdogs takedowns it will illustrate what i mean, the players character initiates the takedown, there are a few different types of takedowns sometimes depending on what weapon is equipped and what position the player is relative to the victim. But as u can see the victim plays an animation that goes with the takedown. I was looking for a good way to do that, select a takedown at random and have the victim character play the takedown that goes with it

 

I fixed your YouTube tag for you. :)

Link to comment
Share on other sites

if u watch this video of watchdogs takedowns it will illustrate what i mean, the players character initiates the takedown, there are a few different types of takedowns sometimes depending on what weapon is equipped and what position the player is relative to the victim. But as u can see the victim plays an animation that goes with the takedown. I was looking for a good way to do that, select a takedown at random and have the victim character play the takedown that goes with it

 

I fixed your YouTube tag for you. :)

 

lol thanks :)

Link to comment
Share on other sites

I would not recommend you to do scripted battle sequences like in watch dogs, they are stupid, taking down an opponent should depend on skill not on pressing a button.

I imagine take downs more a special thing, like if you catch the enemy unprepared from behind, you can take them down in a short sequence. Or as a finishing move like in doom, but before you can finish an enemy you had to damage him enough first.

Don't think too complicated, make the simple version work first, you also save work on animations, since making animations can be complicated as well.

Link to comment
Share on other sites

I only want a takedown when the victim is not aware of the attackers presence so only when the attacker is either on one of the sides or behind, and never when the attacker is sprinting. The video in watchdogs was to show u the animations. I have access to a motion capture suite so making the animations isn't the most difficult just a bit of cleanup to be done afterwards is all but for testing purposes i will be hand animating my test stick figure men.

Link to comment
Share on other sites

I have TAIK installed and will see if I can't help you get started. It is what you are looking for. Its a stealth move and works from four positions. Front back left right. I certainly wish that Bryce had included the source Blender files but hey. He put a ton of work into it. Amazing really. I will try to post back tonight. I'm afraid I'm crazy busy.

Link to comment
Share on other sites

What I would do:


1st: Disable player movement and victim AI (note: if the conditions for the fatality are met).

2nd: Move the player and the victim to the initial positions and rotations.

3rd: Just use playThread with both of them for the animations they need.

4th: When the animation is finished, do the damage and re-enable the AI and the movement of the player.


Issues:

-Maybe the player can't be animated correctly. A little C++ change to disable the standard animations for Player class could be needed.

-Conditions that interfere in the animation (like being attacked by another enemy).

-To move to the correct starting locations could be a bit abrupt.


Is there another difficulty I'm not understanding?

Link to comment
Share on other sites

no difficulty its very easy to get two characters to play an animation, its getting them to play the correct animation that i want to make sure im doing it the most efficient way. The takedown is going to lead to a death straight away so the victim is already dead when the takedown starts and there will be no ai its purely multiplayer.

Link to comment
Share on other sites

Sorry for the late post. It appears your idea seems to be how Bryce did it. He has 8 animations named ft1_loser, ft1_winner, ft2_loser, ft2_winner....and so on. For each direction of killing and being killed. He uses the prefix "ft1" through "ft4" and specifies this when a takedown is initiated. He adds some timing for how long it takes for each takedown, so that either winner or loser can be shot by a third party during the takedown. I hope Bryce doesn't mind but I'll post some sample code. This is from TAIKTakedown.cs


 

//---------------------------------------------
// Attack1
//   Chokehold from behind.
//   Winner slides to position 1m behind loser
 
function attack1(%win,%lose)
{
  %prefix = "ft1_"; // Animation name is this + "loser" or "winner", e.g. FT1_Winner, or FT1_Loser
  %winOffsetFromLose = "0 -1 0"; // Winner should perform this takedown 1m behind loser
  %loseOffsetFromWin = ""; // Loser of this takedown should stay put
  %initPadTime = 100; // 10ms before playing animations, enough time to get everyone to stop what they're doing
  %lookCode = 1; // 1 = Winner looks toward loser, 2= loser looks toward winner
  %winFightTime = 2800 + %initPadTime; // Time in ms until the winner is done with the fight, and control is re-acquired.
  %loseFightTime = 5000 + %initPadTime; // How long until the loser is given their control binds back (though they're dead, they may want to respawn)
  %noReturnTime = 1820; // Time (ms) until victim is officially dead. %lose can escape the fight if %win dies before this time has elapsed.
  %disarmTime = 2800; // Time (ms) until victim drops their gun
 
  %p = %win.prepActor(%lose,%winOffsetFromLose,%loseOffsetFromWin,%lookCode);
  if (%p == -1)
    return;
  %lose.prepActor(%win,"","",0);
  %lose.fightKiller = %win;
  %win.fightVictim = %lose;
  %win.ensureLookingAtVictim(%lose,%winFightTime);
 
  schedule(%initPadTime,0,attack1_action,%win,%lose,%prefix);
  %lose.schedule(%noReturnTime,takedownDeath,%win);
 
  %win.schedule(%winFightTime,leaveFight);
  %lose.schedule(%loseFightTime,leaveFight);
  %lose.schedule(%disarmTime,holsterWeapon);
 
  %win.holsterWeapon();
}
 
function attack1_action(%win,%lose,%prefix)
{
  if (%win.getState() $= "Dead" || %lose.getState() $= "Dead") return;
  %win.destroyThread(0);
  %lose.destroyThread(0);
  %win.setActionThread(%prefix @ "winner");
  %lose.setActionThread(%prefix @ "loser");
 
  playFightAudio(%win,AudioClosest3D,"fight1",%lose.getWorldBoxCenter());
}
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...