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?
Use
Level.OnPlayerDamage = ::FunctionName;
then create a function:
FunctionName(eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, timeOffset)
{
return eAttacker.damagebonus * iDamage / 100
}
(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?
Hmm, I may use it another mod.
When i remove that line, everything works perfect.
(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
if mod.falling or something like that , ive seen it before one sec
..............
Code:
(sMeansOfDeath == "MOD_TRIGGER_HURT" || sMeansOfDeath == "MOD_FALLING")
works great
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
You start with 100 bonus. I'll try it when I get home.