High-Five Taunts

Geit

💜 I probably broke it 💜
aa
May 28, 2009
598
1,161
Last edited:
Apr 13, 2009
728
309
Great ! Dunno why Valve hasn't done this already...

What are the requirements for it to trigger over the regular taunt ? Standing in front of a teammate who is staring back at you ?
 

Geit

💜 I probably broke it 💜
aa
May 28, 2009
598
1,161
Great ! Dunno why Valve hasn't done this already...

What are the requirements for it to trigger over the regular taunt ? Standing in front of a teammate who is staring back at you ?

There's a special command/bind for doing the high-five. - The requirements are quite longwinded, so I've put up the code below

Code:
if (g_Taunting[client] || g_Taunting[client2] || TF2_GetPlayerConditionFlags(client) & TF_CONDFLAG_TAUNTING || TF2_GetPlayerConditionFlags(client2) & TF_CONDFLAG_TAUNTING)
			{
				return Plugin_Handled; //One of them is already taunting.
			}
			if (GetClientTeam(client) != GetClientTeam(client2))
			{
				PrintToChat(client, "[SM] Target must be on your team");
				return Plugin_Handled;
			}
			if (GetClientAimTarget(client2, true) != client)
			{
				PrintToChat(client, "[SM] Target must be looking at you");
				return Plugin_Handled;
			}
			new Float:clientPos[3], Float:client2Pos[3];
			GetClientEyePosition(client, clientPos);
			GetClientEyePosition(client2, client2Pos);
			if (clientPos[2] - client2Pos[2] > 10 || clientPos[2] - client2Pos[2] < -10)
			{
				PrintToChat(client, "[SM] Target must be level with you");
				return Plugin_Handled;
			}
			new Float:DistanceApart = GetVectorDistance(clientPos, client2Pos, false);
			if (DistanceApart < 50 || DistanceApart > 78)
			{
				PrintToChat(client, "[SM] Target get is too close or too far away (%f)", DistanceApart);
				return Plugin_Handled;
			}
			if (TF2_GetPlayerClass(client) == TFClass_Engineer || TF2_GetPlayerClass(client2) == TFClass_Engineer )
			{
				PrintToChat(client, "[SM] You may not do this as an Engineer");
				return Plugin_Handled;
			}
(Look at the Print To Chat's if you can't read code. :3)
 

Da_Man

L4: Comfortable Member
Aug 23, 2009
173
39
Cool, but I wonder if its possible for someone to spam these and keep you stuck in spawn the whole round.

I shall try that. :D
 
Apr 13, 2009
728
309
Cool, but I wonder if its possible for someone to spam these and keep you stuck in spawn the whole round.

I shall try that. :D

Griefers united; FTL ! :O

@Geit : OK, thanks. The engineer can't do it, I assume he doesn't have a high-five taunt animation ? Engineers are usually busy during setup anyway so they wouldn't have enough time to goof around with it. :p
Is it a one-way thing as Da_Man implies or does it require both players to input the command together ? There were highfive miss animations too as I recall.
 

Geit

&#128156; I probably broke it &#128156;
aa
May 28, 2009
598
1,161
Griefers united; FTL ! :O

@Geit : OK, thanks. The engineer can't do it, I assume he doesn't have a high-five taunt animation ? Engineers are usually busy during setup anyway so they wouldn't have enough time to goof around with it. :p
Is it a one-way thing as Da_Man implies or does it require both players to input the command together ? There were highfive miss animations too as I recall.

Yeah, Valve removed the engineers animations for no apparent reason, I'll be firing off an email to ask about them next week, along with some other things. - It's one way, but it's usually fairly hard to actually do it without the other party consenting, and I am in the process of implementing a 'cooldown' to prevent major griefing.

As for the Miss anitations, they are dealt with in the code.
Code:
if (DistanceApart < 62 || DistanceApart > 66)
			{
				TauntToUse = GetRandomInt(0, 1); // Failed
				TauntToUse2 = GetRandomInt(0, 1); // Failed (target animation)
			}
			else
			{
				TauntToUse = GetRandomInt(2, 3); // Success
				TauntToUse2 = GetRandomInt(2, 3); // Success (target animation)
			}
 

lana

Currently On: ?????
aa
Sep 28, 2009
3,075
2,778
They probably removed the engineer's animations because of all the taunts he has. And all the carrying animations.

EDIT:

Actually that doesn't make a whole lot of sense five seconds after I post it.
 

En Ex

L1: Still Registered
aa
Jun 30, 2010
47
17
This is really cool.

I hope Valve finishes this up and officially implements it soon (as opposed to leaving the animations sitting around unused in the model files).
 

Jakkarra

L4: Comfortable Member
Aug 26, 2009
167
36
Great work!

I feel they need a little refining though...