Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to buff Flak Jacket?
#1
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?

[Image: enjin-103434-13169654251028747231-blue.png]
Reply

#2
in _callbacksetup.gsc:
Code:
if(self hasPerk(PERK) && self getCurrentweapon() == "blalbla")  { iDamage = MORE DAMAGE; }
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#3
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;
}
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#4
Does the above code divide all damage by 3 or just the explosive dmg?
[Image: enjin-103434-13169654251028747231-blue.png]
Reply

#5
(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.
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#6
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.
[Image: enjin-103434-13169654251028747231-blue.png]
Reply

#7
(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" )
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#8
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?
[Image: enjin-103434-13169654251028747231-blue.png]
Reply

#9
(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;

(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Making a Flak Cannon type gun. koil 8 4,320 06-05-2011, 13:24
Last Post: koil

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.