Author Topic: Code line to multiply HP per player  (Read 583 times)

How exactly would you accomplish this?
I'm assuming it at:
Code: [Select]
maxdamage= 150;Where at =150.
So does anyone know how to do this?

You cannot dynamically change any datablock values without loving things up.


You need to package the ::damage function. Look at the OMA code.

You can't do it quite like that, as HP is a property of the datablock, and you'd have to give everyone a different datablock if you wanted them to have different amounts of max HP.

However you can create the illusion of higher HP by packaging the damage function to reduce the amount of damage done
Code: [Select]
package fakeMaxHP
{
    function Player::damage(this,%obj,%pos,%damage,%damageType)
    {
        %damage = %damage / (%this.fakeMaxHP / 100);
        Parent::damage(%this,%obj,%pos,%damage,%damageType);
    }
};
ActivatePackage(fakeMaxHP);
Then you just do %player.fakeMaxHP = #;