Raised This Month: $12 Target: $400
 3% 

[L4D2] Incapacitated Automatic Health Regen And Self Revive v2.12【2024-03-24】


Post New Thread Reply   
 
Thread Tools Display Modes
Author
little_froy
Senior Member
Join Date: May 2021
Plugin ID:
7733
Plugin Version:
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
Servers with this Plugin:
 
Plugin Description:
Old 07-28-2021 , 07:14   [L4D2] Incapacitated Automatic Health Regen And Self Revive v2.12【2024-03-24】
Reply With Quote #1

Description
  • Allow survivor automatically regenerate health when been incapacitated and get self revive when health reaches the max.

Cvars
PHP Code:
// default health when down
// -
// Default: "240"
// Minimum: "1.000000"
incap_self_revive_down_default_health "240"

// how long need to wait after health reaches the max when down
// -
// Default: "1.0"
// Minimum: "0.000000"
incap_self_revive_down_finish_time "1.0"

// how many health heal once when down
// -
// Default: "5"
// Minimum: "1.000000"
incap_self_revive_down_health "5"

// how long time will count to hit time if takedamage or pinned by special infected when down
// -
// Default: "1.0"
// Minimum: "0.000000"
incap_self_revive_down_hit_duration "1.0"

// if keeping takedamage or pinned by special infected longer than this, instantly failed. 0.0 or lower = disable
// -
// Default: "40.0"
incap_self_revive_down_hit_time_max "40.0"

// 1 = enable, 0 = disable. interrupt healing on hurt when down?
// -
// Default: "1"
incap_self_revive_down_interrupt_on_hurt "1"

// repeat interval after healing start when down
// -
// Default: "1.0"
// Minimum: "0.000000"
incap_self_revive_down_repeat_interval "1.0"

// how long need to wait to heal after takedamage or pinned by special when down
// -
// Default: "2.0"
// Minimum: "0.000000"
incap_self_revive_down_start_wait "2.0"

// default health when ledge
// -
// Default: "240"
// Minimum: "1.000000"
incap_self_revive_ledge_default_health "240"

// how long need to wait after health reaches the max when ledge
// -
// Default: "1.0"
// Minimum: "0.000000"
incap_self_revive_ledge_finish_time "1.0"

// how many health heal once when ledge
// -
// Default: "5"
// Minimum: "1.000000"
incap_self_revive_ledge_health "5"

// how many health will decay after revived from ledge
// -
// Default: "10"
// Minimum: "0.000000"
incap_self_revive_ledge_health_decay "10"

// how long time will count to hit time if takedamage or pinned by special infected when ledge
// -
// Default: "1.0"
// Minimum: "0.000000"
incap_self_revive_ledge_hit_duration "1.0"

// if keeping takedamage or pinned by special infected longer than this, instantly failed. 0.0 or lower = disable
// -
// Default: "40.0"
incap_self_revive_ledge_hit_time_max "40.0"

// 1 = enable, 0 = disable. interrupt healing on hurt when ledge?
// -
// Default: "1"
incap_self_revive_ledge_interrupt_on_hurt "1"

// repeat interval after healing start when ledge
// -
// Default: "1.0"
// Minimum: "0.000000"
incap_self_revive_ledge_repeat_interval "1.0"

// how long need to wait to heal after takedamage or pinned by special when ledge
// -
// Default: "2.0"
// Minimum: "0.000000"
incap_self_revive_ledge_start_wait "2.0" 
Natives and Forwards
Spoiler


Related Plugins
Change Log
Spoiler
Attached Files
File Type: inc incap_self_revive.inc (1,016 Bytes, 15 views)
File Type: sp Get Plugin or Get Source (incap_self_revive.sp - 1 views - 28.9 KB)

Last edited by little_froy; 03-24-2024 at 10:29.
little_froy is offline
Toranks
Senior Member
Join Date: Dec 2021
Location: Spain
Old 12-02-2021 , 08:57   Re: [L4D2] Incapacitated Automatic Health Regen and Self Revive Enhanced v4.3.0
Reply With Quote #2

If I pause the game, the health regeneration continues. When unpause, they recover all the life that corresponds to them for the elapsed time of pause. If you fix it, it's will be a perfect mod

Bots do not pause regeneration when attacked. This is fine by me, as bots are clumsier than the player, but I would like it to be configurable with a separate command like incap_bot_reviveXXXX

Last edited by Toranks; 12-02-2021 at 09:01.
Toranks is offline
Toranks
Senior Member
Join Date: Dec 2021
Location: Spain
Old 04-26-2022 , 18:35   Re: [L4D2] Incapacitated Automatic Health Regen and Self Revive Enhanced【unapproved】
Reply With Quote #3

Oh, what a pity that this mod was unapproved and deprecated. It was very useful for me because allows you to choose how much temporary health you start with when a Survivor get incapped on a ledge, including the corresponding animation. Then, survivor begins to fall down (80 HP), and gradually stands up on his own, with his own animations. It's very realistic like that and I've been playing that way for a year now.
On the other hand, since I am not interested on normal incapped autorecovery, I have edited the code so it allows for negative values of incap_self_revive_ledge_point, which I use to customize the rate at which a survivor loses life while incapacitated. Is mandatory to use incap_self_revive_down_default "299" instead of "300" or there will be a bug. I don't know how to disable the mod during normal incapacitation due to lack of cvars and so far I haven't really looked at the code much I was already satisfied with it.

I can post the source code if anyone is interested and the author or administrators allow it. In the meantime, I'll keep it as a little treasure.
Toranks is offline
little_froy
Senior Member
Join Date: May 2021
Old 12-06-2022 , 00:11   Re: [L4D2] Incapacitated Automatic Health Regen and Self Revive v1.5.0 【2022-12-06】
Reply With Quote #4

Code:
1.5.0 (2022-12-06:
mission will failed when every died or incapped, remove translation and commands.
little_froy is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 12-06-2022 , 01:53   Re: [L4D2] Incapacitated Automatic Health Regen and Self Revive v1.5.1 【2022-12-06】
Reply With Quote #5

- You should be putting the clients userid into timers and validating in the timer callback otherwise you're likely going to affect someone else.
- Alternatively since you're storing the timer handle in a client array you could delete that if they disconnect.
- Your OnGameFrame stuff is crazy, I don't think you need to be using this forward for these things, and other plugins of yours are also using it a lot.
- You have multiple client loops in OnGameFrame which could be consolidated into 1. You really should be optimizing stuff that goes inside OnGameFrame, Think hooks and SetTransmit, since these are called so often it can easily have an impact on the server if the code is doing a lot of stuff.
- You don't need "public" before callbacks that you have named yourself, only for SM forwards and 3rd party plugin forwards.
__________________
Silvers is offline
Zheka
New Member
Join Date: Dec 2022
Old 12-27-2022 , 01:00   Re: [L4D2] Incapacitated Automatic Health Regen and Self Revive v1.10【2022-12-24】
Reply With Quote #6

Сan you add an animation to play when standing up?

Last edited by Zheka; 12-27-2022 at 12:24.
Zheka is offline
Zheka
New Member
Join Date: Dec 2022
Old 12-27-2022 , 12:08   Re: [L4D2] Incapacitated Automatic Health Regen and Self Revive v1.10【2022-12-24】
Reply With Quote #7

Quote:
Originally Posted by Marttt View Post
You should provide an English translation too, since here is mainly an English forum. (also mentioned in the rules)

Google Translate: "Can you add an animation to play while standing up?"
I'm sorry, I just made a mistake and inserted the original text in the message instead of the translated one and didn't notice it.
Zheka is offline
49459317
Junior Member
Join Date: May 2021
Location: Sichuan
Old 02-22-2023 , 13:21   Re: [L4D2] Incapacitated Automatic Health Regen And Self Revive v1.22【Final】
Reply With Quote #8

666666
49459317 is offline
little_froy
Senior Member
Join Date: May 2021
Old 02-22-2024 , 09:43   Re: [L4D2] Incapacitated Automatic Health Regen And Self Revive v2.0【2024-02-22】
Reply With Quote #9

Code:
2.0 (2024-02-22:
-totally rewrite the code, much safer and faster.
-add cvar to control max hit time to prevent infinite healing.
little_froy is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:43.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode