Garry's Mod

Garry's Mod

31 ratings
Simple Overheal
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Server content
Addon Tags: Fun, Realism
File Size
Posted
Updated
2.994 KB
26 Aug, 2023 @ 8:44am
11 Dec, 2024 @ 3:00pm
4 Change Notes ( view )

Subscribe to download
Simple Overheal

Description
In collaboration with ChatGPT:


This addon introduces an overheal mechanic seen in many cartoon/arcade style FPS games. The addon comes with multiple console variables.

sv_overheal_automatic
Automatically gain HP regardless of interacting.

sv_overheal_refreshRate
Sets the refresh rate of the addon. Lower means more performance.

sv_overheal_target
If health is above this number, then start decaying.

sv_overheal_rate
How fast should health be decayed over time.

sv_overheal_ease
How slow should the decay be when approaching target health.

sv_overheal_penalty
Bigger number means more health is decayed when further away from target health.

sv_overheal_maxHealth
Sets maximum health of player when interacting.

This addon is not self-aware, meaning it will most likely not play well if there are other addons that also modify max health.
17 Comments
yourlocallawyer 1 Jul @ 5:42pm 
?
yourlocallawyer 1 Jul @ 5:42pm 
ew ai
Stoque  [author] 11 Dec, 2024 @ 2:58pm 
i've done some playtesting this time. And this should fix it.
dandykong 10 Dec, 2024 @ 7:36pm 
Syntax error on line 48 (the timer you just tried to fix) is now stopping the whole addon from loading.

Timers with a nil value instead of a function need to be one line. Add a right parenthesis to line 48 and delete 49 and 50.
Stoque  [author] 10 Dec, 2024 @ 10:00am 
You're a godsend. I never caught that during my play testing. I'll make the adjustments as soon as I get back home.
dandykong 10 Dec, 2024 @ 8:23am 
Health drain timer in the DrainPlayerHealth function should be:
timer.Adjust("HealthDrainTimer", delay, 0, nil)

Existing code has a bug where it loses the for loop and only affects the first player on the server. It works fine in singleplayer though...
Stoque  [author] 25 Sep, 2023 @ 5:50pm 
Most HUDs assume your max HP will be at 100 no matter what, so all they do is check your percentage of max HP and interpolate that from 0 health to get the render. But because the addon brute forces your max HP to 1,000 when pressing the +use key, it messes up the calculations.
Lombaxtard 25 Sep, 2023 @ 12:30pm 
All the HUDs I've tested this with have the same issue: if I'm holding a +use button my health bar indicated that I have 10 HP (SlateHUD, Minimal HUD), however my real health is still what it was before and I've tested that by taking more than 10HP damage
Whenever I depress +use button my HUDs go back to normal
SuperToaster 31 Aug, 2023 @ 4:10am 
Holy crap, someone using ChatGPT for GOOD purposes? Awesome addon. :bigjohn:
Stoque  [author] 30 Aug, 2023 @ 4:43am 
Gm_nexus