Author Topic: New Health System V3 (SetMaxHealth, AddMaxHealth)  (Read 14054 times)

This is nice, however overwriting that many functions could break other add-ons. You should use the Support_Preload to overwrite the functions before any other add-on.
That only works for client sided add-ons.

But you could create a preload.cs which packages some function before add-ons are loaded, which then executes the add-on (I think using the forceRequiredAddon function would work best so it wouldn't execute twice).

or you could call it ZZZ_addonName and it will be the first to load (if there arent others)

Now renamed as Zzerver_NewHealth

Added the medic pack.

Update: Did a little tweaks to the kill function, since it only took what the datablock's real health had, now it completely sets everything to 0 and kills them.
« Last Edit: July 19, 2014, 12:06:12 PM by Advanced Bot »




Something is very odd using addHealth/setHealth when using fake health. I'll try to see if I can get it fixed. It was working.
It's not really a big deal, I could always make another way.
« Last Edit: July 19, 2014, 04:26:11 PM by Advanced Bot »

"Zzerver"? That's a new one.

Also, what exactly about VCE does it overwrite? As someone who uses VCE a lot and being overly paranoid about the smallest things, I need to know what it's overwriting before I use it.

"Zzerver"? That's a new one.

Also, what exactly about VCE does it overwrite? As someone who uses VCE a lot and being overly paranoid about the smallest things, I need to know what it's overwriting before I use it.
<var:pl:health>
<var:pl:maxHealth>

Fixed the health functions again, they should work now.

You broke VCEs ability to modify <var:pl:health> (and probably damage). I also recommend allowing setting the max health using VCE.

You broke VCEs ability to modify <var:pl:health> (and probably damage).

That was never possible.


That was never possible.

From Event_Variables:
Code: [Select]
registerSpecialVar(Player,"health","%this.getDatablock().maxDamage - %this.getDamageLevel()","setHealth");
The last parameter is the function to set the variable.

From Event_Variables:
Code: [Select]
registerSpecialVar(Player,"health","%this.getDatablock().maxDamage - %this.getDamageLevel()","setHealth");
The last parameter is the function to set the variable.
I have tried using it, it somehow breaks. I don't know how it does, since I try it using regular setHealth method and it works, but using vce with it breaks. VCE is pretty glitchy and should be remade.
« Last Edit: April 12, 2015, 11:55:38 AM by Advanced Bot »