Old Takedown Resource?

Scripting questions, discussions, etc
  • 1
  • 2
20 posts Page 2 of 2
LukasPJ
Site Admin
Posts: 348
Joined: Tue Feb 03, 2015 7:25 pm
 
by LukasPJ » Thu Jun 08, 2017 4:35 pm
marauder2k9 wrote: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. :)
marauder2k9
Posts: 138
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Thu Jun 08, 2017 4:43 pm
LukasPJ wrote:
marauder2k9 wrote: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 :)
Duion
Posts: 813
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Thu Jun 08, 2017 6:44 pm
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.
marauder2k9
Posts: 138
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Thu Jun 08, 2017 10:46 pm
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.
Jason Campbell
Posts: 163
Joined: Fri Feb 13, 2015 2:51 am
 
by Jason Campbell » Sat Jun 10, 2017 3:49 pm
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.
marauder2k9
Posts: 138
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Sun Jun 11, 2017 4:14 am
thanks jason,

i wont require the animations ill be making my own i just want to know what way he set it up so that both characters play the right animation together
irei1as
Posts: 70
Joined: Fri Feb 27, 2015 5:13 pm
by irei1as » Sun Jun 11, 2017 6:27 pm
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?
marauder2k9
Posts: 138
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Mon Jun 12, 2017 3:53 am
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.
Jason Campbell
Posts: 163
Joined: Fri Feb 13, 2015 2:51 am
 
by Jason Campbell » Mon Jun 12, 2017 7:49 am
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());
}
marauder2k9
Posts: 138
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Mon Jun 12, 2017 4:02 pm
that is perfect thank you! i can see now how bryce has done it i might hardcode this into the engine as its own class so instead of a weapon you make different states and parameters for a takedown instead
  • 1
  • 2
20 posts Page 2 of 2

Who is online

Users browsing this forum: No registered users and 0 guests