ItsMods
Increase damage - Printable Version

+- ItsMods (https://www.itsmods.com)
+-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html)
+--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html)
+--- Thread: Increase damage (/Thread-Increase-damage.html)



Increase damage - Lemon - 04-06-2012

I put self.bonusdamange = 100; for survivors

Then under
CodeCallback_PlayerDamage(eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, timeOffset)
I put this -> iDamage = eAttacker.bonusdamage * iDamage / 100;

Now when they jump off a cliff, they don't die.

Could you please help?



RE: Increase damage - iAegle - 04-06-2012

Use

Level.OnPlayerDamage = ::FunctionName;

then create a function:

FunctionName(eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, timeOffset)
{
return eAttacker.damagebonus * iDamage / 100
}


RE: Increase damage - Lemon - 04-06-2012

Wouldn't it be the same?


RE: Increase damage - iAegle - 04-06-2012

(04-06-2012, 21:44)Lemon Wrote: Wouldn't it be the same?

Yes, but then you wouldn't have to edit an existing file which means you can play normal gametypes aswell.

and bysides that, the code looks legit so it should work fine so there's not really a problem... are you sure its that part of the code and not something else?


RE: Increase damage - Lemon - 04-06-2012

Hmm, I may use it another mod.

When i remove that line, everything works perfect.


RE: Increase damage - iAegle - 04-06-2012

(04-06-2012, 21:48)Lemon Wrote: Hmm, I may use it another mod.

When i remove that line, everything works perfect.

Hmm weird .. maybe use a float number for the bonus ?

like

self.damagebonus = 0.5;

iDamage = iDamage * eAttacker.damagebonus

?

shouldn't make a difference .. but hey who knows


RE: Increase damage - rotceh_dnih - 04-07-2012

if mod.falling or something like that , ive seen it before one sec
..............


Code:
(sMeansOfDeath == "MOD_TRIGGER_HURT" || sMeansOfDeath == "MOD_FALLING")

works great Smile


RE: Increase damage - iAegle - 04-07-2012

With falling the attacker is the player itsself so when you have a bonus of lets say 50 the damage will be 50% of the actual damage therefor you wont die unless you jump from something really high


Increase damage - Lemon - 04-07-2012

You start with 100 bonus. I'll try it when I get home.