Raised This Month: $51 Target: $400
 12% 

FF2 Special Finisher Ability (Heavy only)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
UberMedicFully
Senior Member
Join Date: Oct 2019
Location: In 2Fort chilling
Old 02-23-2022 , 00:57   Special Finisher Ability (Heavy only)
Reply With Quote #1

I felt like there are moments where Heavies are pretty annoying once they got ton of overheal, so i made this Ability, yes i did take code here and there, authors are credited in the code.
If theres any code from you where i forgot to credit, post a comment and i'll edit this post and add the missing authors.

I kinda said that i didnt want to post stuff in the public anymore but ehm well, dunno hf with this i guess

There are additional features.
When the Heavy is at 330 or below 330 hp, they will not be finished, meaning the melee will not do anything and will deal very low damage or more, you do you

The client will NOT die when Ubercharged, neither when ubercharged later on, Medics or a RTD with UBER can save the client from dying. (Recommended to not use the Host Timescale if you want this to happen often so medics can react or just increase it, works too.)

Anyways these are untested things:

- The Sound arguments (fixed)

-------

Also the Fog doesnt work in the first round eh-.. (Im pretty lazy to fix it A..)

PHP Code:
"abilityX"
    
{
        
"name" "special_finisher_heavy"
        "arg1"    "6.0"                
// Duration.
        
"arg2"    "tf_weapon_fists"    // Melee class name.
        
"arg3"    "5"                    //    Melee index.    
        
"arg4"    "1 ; 0.05"            // Attributes.
        
"arg5"    "2"                    // Slot, 2 = Melee. Do not change
        
"arg6"    "0"                    // Hide the Melee..? Not recommended lol
        
"arg7"    "1"                    // Force equip, eh yes
        
"arg13"    "1.5"                // Stun duration
        
"arg14"    "1.5"                // Delay before the finish. (The USER will not DIE when ubercharged, will automatically stop when it was about to kill the client)
        
"arg15"    "0.1"                // Host Time Scale.
        
"arg16"    ""                    // Global Sound to play when activated.
        
"arg17"    ""                    // Global Sound to play once hitting a heavy 
        
"arg18"     "340.0"                      // at what HP to be allowed to oneshot the heavy
        
        //Fog

        
"arg20"    "0" // blend
        
        // color 1
        
"arg21"    "200"    // blue
        
"arg22"    "0"    // red
        
"arg23"    "0"    //  green
        
        // color 2
        
"arg24"    "200"    // blue
        
"arg25"    "0"    // red
        
"arg26"    "0"    // green
        
        // fog properties
        
"arg28"    "100.0"    // fog start distance
        
"arg29"    "384.0"    // fog end distance
        
"arg30"    "1.0"    // fog density
        
"arg31"    "1.2"    // fog duration

        
"arg40"    "1.2"

        "plugin_name"        "ff2_finisher"
    

Attached Files
File Type: sp Get Plugin or Get Source (ff2_finisher.sp - 116 views - 16.7 KB)
File Type: smx ff2_finisher.smx (13.5 KB, 78 views)
__________________
Steam
FF2 Developer
My Public Hales
I love to make Freaks that are related to TF2

Last edited by UberMedicFully; 02-23-2022 at 09:02. Reason: changes lol
UberMedicFully is offline
UberMedicFully
Senior Member
Join Date: Oct 2019
Location: In 2Fort chilling
Old 02-23-2022 , 02:13   Re: Special Finisher Ability (Against overhealed heavies only)
Reply With Quote #2

Uhm yea, i talked to Lord Homicide aka Spookmaster and he told me a less complicated way to detect if the user is above 330 lmao
just do if(GetEntProp(client, Prop_Data, "m_iHealth") > 330.0) instead of
if(GetEntProp(client, Prop_Data, "m_iHealth") < 99999.0)

and remove if (TF2_GetPlayerClass(client) != TFClass_Heavy) as its unneeded because im already checking if the user im hitting a heavy is

below is the edit for those who cant edit lines..
Attached Files
File Type: sp Get Plugin or Get Source (ff2_finisher.sp - 61 views - 16.6 KB)
__________________
Steam
FF2 Developer
My Public Hales
I love to make Freaks that are related to TF2

Last edited by UberMedicFully; 02-23-2022 at 02:20.
UberMedicFully is offline
Naydef
Senior Member
Join Date: Dec 2015
Location: Doom Town, Nevada
Old 02-23-2022 , 05:04   Re: Special Finisher Ability (Against overhealed heavies only)
Reply With Quote #3

To continue the discussion

Why do you add static storage class to local arrays? I only see use of it when allocating big arrays (and in some language this storage becomes part of the executable in the data section).

I see you are caching the result of FF2_GetBossTeam(). I don't think the overhead of calling native function is that great so just call it.

Actually, why are you using FF2_GetBossTeam(). I believe we should be trying to make all new abilities work in BvB mode. In that case you should check if a player is boss and then get his team in place of FF2_GetBossTeam().

You may remove smac and morecolors imports. I don't see them used anywhere.

You can also use RemoveEntity() to remove entity instead of AcceptEntityInput(Ent, "Kill");. Not a big deal.

PHP Code:
if(GetEntProp(clientProp_Data"m_iHealth") > 330.0)        // Just in case that the heavy is above 300 health to get oneshotted
{
    if(
GetEntProp(clientProp_Data"m_iHealth") < 330.0)    // If at 330 health OR lower, return and ignore everything below
        
return;
        ... 
Why two checks? Remove the second one (also currently if you have exactly 330 HP both checks will pass... Ops)

These all are recommendations.
__________________
My plugins:
*None for now*


Steam:
naydef

Last edited by Naydef; 02-23-2022 at 05:07.
Naydef is offline
UberMedicFully
Senior Member
Join Date: Oct 2019
Location: In 2Fort chilling
Old 02-23-2022 , 08:29   Re: Special Finisher Ability (Against overhealed heavies only)
Reply With Quote #4

Yea, i did tests in that plugin before i actually got into making this Ability, i should remove stuff that arent needed lol..
You arent supposed to die when having 330 hp, only above it, i should change the value to 335 or smthing then, eh well ye again im just new and i like to learn thank you naydef, was thinking by my own if its right to do 2 checks or not lol now i know its dumb kek

Quote:
Old Today , 05:04 Re: Special Finisher Ability (Against overhealed heavies only)
Reply With Quote Multi-Quote This Message Quick reply to this message #3
To continue the discussion

Why do you add static storage class to local arrays? I only see use of it when allocating big arrays (and in some language this storage becomes part of the executable in the data section).

I see you are caching the result of FF2_GetBossTeam(). I don't think the overhead of calling native function is that great so just call it.

Actually, why are you using FF2_GetBossTeam(). I believe we should be trying to make all new abilities work in BvB mode. In that case you should check if a player is boss and then get his team in place of FF2_GetBossTeam()
(The Weapon Ability isnt from me, i credited the Original Creator in it, i just added the insta kill etc.) Wasnt sure if it was needed or not so i just let it there
__________________
Steam
FF2 Developer
My Public Hales
I love to make Freaks that are related to TF2

Last edited by UberMedicFully; 02-23-2022 at 08:32.
UberMedicFully is offline
UberMedicFully
Senior Member
Join Date: Oct 2019
Location: In 2Fort chilling
Old 02-23-2022 , 08:59   Re: Special Finisher Ability (Against overhealed heavies only)
Reply With Quote #5

Ok so i made a few changes, look on top. Its untested but should work.
__________________
Steam
FF2 Developer
My Public Hales
I love to make Freaks that are related to TF2
UberMedicFully is offline
Naydef
Senior Member
Join Date: Dec 2015
Location: Doom Town, Nevada
Old 02-23-2022 , 09:20   Re: Special Finisher Ability (Against overhealed heavies only)
Reply With Quote #6

Quote:
Originally Posted by UberMedicFully View Post
Ok so i made a few changes, look on top. Its untested but should work.
The code looks nicer now. Thanks.

I missed you saying that you used code from others, so excuse me. No wonder the difference in code style.
__________________
My plugins:
*None for now*


Steam:
naydef
Naydef is offline
UberMedicFully
Senior Member
Join Date: Oct 2019
Location: In 2Fort chilling
Old 03-05-2022 , 15:12   Re: Special Finisher Ability (Heavy only)
Reply With Quote #7

Well i got told the weapon doesnt spawn and i tested it myself seems like something got fucked up when i made that one change.
Fix coming soon
__________________
Steam
FF2 Developer
My Public Hales
I love to make Freaks that are related to TF2
UberMedicFully is offline
Samuwu
Member
Join Date: Nov 2021
Location: In a house
Old 03-05-2022 , 15:58   Re: Special Finisher Ability (Heavy only)
Reply With Quote #8

[QUOTE=UberMedicFully;2773151]Well i got told the weapon doesnt spawn and i tested it myself seems like something got fucked up when i made that one change.

Yesss perfect to hear that this is getting fixed
__________________
Samuwu is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:49.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode