High-Five Taunts

Discussion in 'Team Fortress 2 Talk' started by Geit, Jan 7, 2011.

  1. Geit

    aa Geit 💜 I probably broke it 💜

    Messages:
    597
    Positive Ratings:
    1,114
    • Thanks Thanks x 4
    Last edited: Jan 7, 2011
  2. Fr0Z3nR

    aa Fr0Z3nR Creator of blackholes & memes. Destroyer of forums

    Messages:
    6,391
    Positive Ratings:
    4,906
    That, is awesome.
     
  3. Lancey

    aa Lancey Currently On: ?????

    Messages:
    3,076
    Positive Ratings:
    1,314
    Add to server.
     
  4. Loc_n_lol

    Loc_n_lol L10: Glamorous Member

    Messages:
    726
    Positive Ratings:
    273
    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 ?
     
  5. Geit

    aa Geit 💜 I probably broke it 💜

    Messages:
    597
    Positive Ratings:
    1,114
    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)
     
  6. Da_Man

    Da_Man L4: Comfortable Member

    Messages:
    173
    Positive Ratings:
    38
    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
     
  7. Loc_n_lol

    Loc_n_lol L10: Glamorous Member

    Messages:
    726
    Positive Ratings:
    273
    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.
     
  8. Geit

    aa Geit 💜 I probably broke it 💜

    Messages:
    597
    Positive Ratings:
    1,114
    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)
    			}
     
  9. Lancey

    aa Lancey Currently On: ?????

    Messages:
    3,076
    Positive Ratings:
    1,314
    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.
     
  10. Wilson

    aa Wilson Burial by Sleep

    Messages:
    1,256
    Positive Ratings:
    841
    If it is possible, can we get this on both EU and US servers?
     
  11. En Ex

    aa En Ex L1: Still Registered

    Messages:
    47
    Positive Ratings:
    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).
     
  12. Jakkarra

    Jakkarra L4: Comfortable Member

    Messages:
    167
    Positive Ratings:
    36
    Great work!

    I feel they need a little refining though...