AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D1 & L4D2] Vomit Screen Fade [v1.0.2 | 19-July-2022] (https://forums.alliedmods.net/showthread.php?t=334143)

Marttt 08-31-2021 19:57

[L4D1 & L4D2] Vomit Screen Fade [v1.0.2 | 19-July-2022]
 
31 Attachment(s)
Description

This plugin adds a blind fade effect while on vomit, turning the screen darker for some seconds.

Can be used to make Boomers more challenging, since some people may use addons that remove the vomit screen effect.

Features
  • Allow configuring the fade color and alpha.
  • Allow configuring the fade (in/hold/out) duration.
  • Allow blocking other fade effects while plugin fade is active.

Cvars

A configuration file named "l4d_vomit_screen_fade.cfg" will automatically be created for you upon the first run in the "\cfg\sourcemod\" folder.

PHP Code:

// Fade alpha transparency.
// 0 = Invisible, 255 = Fully Visible.
// -
// Default: "245"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_vomit_screen_fade_alpha "245"

// Block other fade effects applied to the client while on plugin fade.
// Example: Red screen when take damage.
// 0 = Disable, 1 = Enable.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_vomit_screen_fade_block "1"

// Fade color.
// Use "random" for random colors.
// Use three values between 0-255 separated by spaces ("<0-255> <0-255> <0-255>").
// -
// Default: "0 20 0"
l4d_vomit_screen_fade_color "0 20 0"

// Enable/Disable the plugin.
// 0 = Disable, 1 = Enable.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_vomit_screen_fade_enable "1"

// Fade hold (between) duration in seconds.
// 0 = Disable.
// -
// Default: "3.0"
// Minimum: "0.100000"
l4d_vomit_screen_fade_hold_duration "3.0"

// Fade in (end) duration in seconds.
// -
// Default: "6.0"
// Minimum: "0.000000"
l4d_vomit_screen_fade_in_duration "6.0"

// Fade out (start) duration in seconds.
// -
// Default: "6.0"
// Minimum: "0.000000"
l4d_vomit_screen_fade_out_duration "6.0" 

Admin Commands
  • sm_vomitfade => Add a fade effect on self (no args) or specified targets. Example: self -> sm_vomitfade / target -> sm_vomitfade @humans. (z flag required)
  • sm_print_cvars_l4d_vomit_screen_fade => Print the plugin related cvars and their respective values to the console. (z flag required)

Change Log

Spoiler


Thank you!

Related Plugins

Post Reply
  • Any feedback, bug reports, fixes, improvements, translations or suggestions for the plugin are welcome.

Requirements

Installation
  • Put the "l4d_vomit_screen_fade.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.

Sev 09-01-2021 16:29

Re: [L4D1 & L4D2] Vomit Screen Fade [v1.0.0 | 31-August-2021]
 
Good idea.

yabi 09-04-2021 08:15

Re: [L4D1 & L4D2] Vomit Screen Fade [v1.0.0 | 31-August-2021]
 
Good, thanks 馬特

a2121858 09-27-2021 11:34

Re: [L4D1 & L4D2] Vomit Screen Fade [v1.0.1 | 04-September-2021]
 
Hi, Mr. Martt.
On my server, I sometimes use [L4D & L4D2] Left 4 DHooks Direct L4D_OnITExpired to clear vomit. I don’t know how to detect that the player has cleared vomit in advance. Can you help me improve or provide some suggestions?
sorry, my English is not well.:)

Marttt 09-27-2021 12:42

Re: [L4D1 & L4D2] Vomit Screen Fade [v1.0.1 | 04-September-2021]
 
Not much related to the plugin, may be better to ask in the Plugin/Gameplay Ideas and Requests area.

In this plugin what I did was create a 15 seconds timer right after triggering L4D_OnVomitedUpon to control the fade duration.

While it looks nice in vanilla configs, may have to adjust the values if the server sets a different time for the vomit duration.

You still have some other options to detect when the "vomit" ended like hooking the game event: player_no_longer_it, but I noticed that sometimes it isn't fired.

You can track through the m_itTimer netprop as well (using a prethink hook), if the vomit ended (value becomes -1 on end, and >0 when starts).

a2121858 09-28-2021 01:26

Re: [L4D1 & L4D2] Vomit Screen Fade [v1.0.1 | 04-September-2021]
 
I will try. Thank you. Mr. Marttt.:)

Marttt 07-19-2022 18:21

Re: [L4D1 & L4D2] Vomit Screen Fade [v1.0.2 | 19-July-2022]
 
Plugin updated. (1.0.2)

Code:

1.0.2 (19-July-2022)
- Minor logic changes to fade duration.


lawkmlaw 04-24-2024 03:35

Re: [L4D1 & L4D2] Vomit Screen Fade [v1.0.2 | 19-July-2022]
 
thanks for your sharing~






提供專業租影印機服務,滿足各種商業及個人需求。我們的影印機具備高效率和卓越性能,適合辦公室多樣化的打印與複 印需求,確保操作簡便且成本有效。


All times are GMT -4. The time now is 12:29.

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