ItsMods

Full Version: How to buff Flak Jacket?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
What's the code to buff flak jacket?
I need to get it to endure more explosive damage. How can I do that?

Also does Mustang & Sally do explosive dmg? As normal Flak Jacket doesn't seem to help at all against that. How could I make the flak jacket perk let the player endure maybe about 3 hits of the gun?

in _callbacksetup.gsc:
Code:
if(self hasPerk(PERK) && self getCurrentweapon() == "blalbla")  { iDamage = MORE DAMAGE; }
Code:
init()
{
    level.onPlayerDamage = ::onPlayerDamage;
}

onPlayerDamage( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime )
{
    if( self hasPerk( "specialty_flakjacket" ) )
    {
        iDamage = iDamage / 3;
    }
    
    return iDamage;
}
Does the above code divide all damage by 3 or just the explosive dmg?
(11-25-2011, 19:43)frozenliquid Wrote: [ -> ]Does the above code divide all damage by 3 or just the explosive dmg?

Damage. There is no explosive damage. There is just one damage.
Hmmh... So what would I have to write if I wanted Flak Jacket to reduce dmg taken from certain weapons? Eg. 10 dmg from grenade launcher and 20 dmg from a frag grenade.

As otherwise it would reduce dmg from every weapon, which I do not want.
(11-25-2011, 20:01)frozenliquid Wrote: [ -> ]Hmmh... So what would I have to write if I wanted Flak Jacket to reduce dmg taken from certain weapons? Eg. 10 dmg from grenade launcher and 20 dmg from a frag grenade.

As otherwise it would reduce dmg from every weapon, which I do not want.

use:

if( self hasPerk( "specialty_flakjacket" ) && sMeansOfDeath == "MOD_EXPLOSIVE" )
If I wrote this in PlayerDamage:

Code:
if(self hasPerk("specialty_flakjacket") && (sMeansOfDeath == "MOD_GRENADE_SPLASH" || sMeansOfDeath == "MOD_GRENADE" || sMeansOfDeath == "MOD_EXPLOSIVE" )

    {
        iDamage = 200;
        return;
    }

Would every explosive weapon do 200 damage? Or am I mistaken?
(11-25-2011, 22:34)frozenliquid Wrote: [ -> ]If I wrote this in PlayerDamage:

Code:
if(self hasPerk("specialty_flakjacket") && (sMeansOfDeath == "MOD_GRENADE_SPLASH" || sMeansOfDeath == "MOD_GRENADE" || sMeansOfDeath == "MOD_EXPLOSIVE" )

    {
        iDamage = 200;
        return;
    }

Would every explosive weapon do 200 damage? Or am I mistaken?

Jep that will work, but you have to return the iDamage, so:
Code:
iDamage = 200;
return iDamage;

or just: return 200;