Raised This Month: $ Target: $400
 0% 

[TF2] Keeping Track of Fire-damage Modifiers


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Alfonso Crawford
Member
Join Date: Feb 2012
Old 06-08-2013 , 10:37   Re: [TF2] Keeping Track of Fire-damage Modifiers
Reply With Quote #15

Cool~! I'll start testing that, MasterOfTheXP!

In case you're curious, the effect I'm going for here is to make the hit player "freak out" if they're hit with direct flames. I don't need to modify the damage: that's better off left to the game itself. The items that increase fire damage throw the calculations all out of whack, so I just need to buff the panic-inducing threshold by how much more damage the player would take:

PHP Code:
public Action:SetAfterburnTimer(Handle:event, const String:name[], bool:dontBroadcast) {
    if(!
CvarMasterSwitch) return;

    new 
attacker GetClientOfUserId(GetEventInt(event"attacker"));
    new 
custom GetEventInt(event"custom");
    new 
damage GetEventInt(event"damageamount");
    new 
victim GetClientOfUserId(GetEventInt(event"userid"));

    new 
weapon GetEntProp(GetEntPropEnt(attackerProp_Send"m_hActiveWeapon"), Prop_Send"m_iItemDefinitionIndex");

    new 
Float:threshold 4.0;

    ...


    if(
custom == TF_CUSTOM_BURNING) {
        if(
weapon != 215 && damage thresholdBurnTimers[victim] = 0.5;
    }
    ....


Last edited by Alfonso Crawford; 06-08-2013 at 10:38.
Alfonso Crawford is offline
 



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 21:28.


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