I decided to share this method I made for my RPG mod.
The new system includes the following events:
- Adds max health to the object, can be subtracted too (less than 1 will go back to 1), you can refill the health if needed.
- Sets the max health of the object.
- Their max health is at 0 (invincible) for # seconds.
These work for bots, vehicles, and players.
The new
%shapebase.getHealth() and
%shapebase.getMaxHealth() support will tell if it will use "real" health or datablock health. This can be very useful.
There is a health saver, but you can also disable it by /ToggleHealthSaver. It's save path is in: config/server/MaxHealth/*
Download
Zzerver_NewHealthThese also overwrite vce's health crap since this mod will obviously not work with it. This is Zzerver_* because it will be most likely the first to exec.
Mod's listed below that use this mod to support (means if this mod is installed the health system will work correctly with this mod, otherwise, it will be glitchy):
Weapon_TF2MedicPackPlease fill out the name of the mod, and the link to it, so I can fix it to have this support.
There is a difference using the real health system and this one, it is pretty obvious, but I like how this one is a lot better.
---Updates---
V1: Crappy health system
-v2-
+ New release, remodded, cleaned up code.
-v2.1-
+ Mini tweaks to the kill function, and the addHealth function.
-v2.15-
+ Fixed the health functions instead of ShapeBase, since it doesn't work that way.
-v3-
+ Added a save script to save and load health. If you have this
mod, I suggest not using it if you have this mod since it already exists. It can be disabled by /ToggleHealthSaver. -> This was requested before the other topic was made