| Blockland Forums > Modification Help |
| Code line to multiply HP per player |
| (1/1) |
| Alphadin:
How exactly would you accomplish this? I'm assuming it at: --- Code: ---maxdamage= 150; --- End code --- Where at =150. So does anyone know how to do this? |
| Chrono:
You cannot dynamically change any datablock values without loving things up. You need to package the ::damage function. Look at the OMA code. |
| Headcrab Zombie:
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: ---package fakeMaxHP { function Player::damage(this,%obj,%pos,%damage,%damageType) { %damage = %damage / (%this.fakeMaxHP / 100); Parent::damage(%this,%obj,%pos,%damage,%damageType); } }; ActivatePackage(fakeMaxHP); --- End code --- Then you just do %player.fakeMaxHP = #; |
| Navigation |
| Message Index |