Raised This Month: $ Target: $400
 0% 

[L4D1 & L4D2] Vomit Screen Fade [v1.0.2 | 19-July-2022]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Plugin ID:
7777
Plugin Version:
1.0.2
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
Servers with this Plugin:
3 
Plugin Description:
Adds a blind fade effect while on vomit
Old 08-31-2021 , 20:57   [L4D1 & L4D2] Vomit Screen Fade [v1.0.2 | 19-July-2022]
Reply With Quote #1

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.
Attached Files
File Type: sp Get Plugin or Get Source (l4d_vomit_screen_fade.sp - 574 views - 19.9 KB)
__________________

Last edited by Marttt; 01-25-2023 at 19:01.
Marttt is offline
Sev
Veteran Member
Join Date: May 2010
Old 09-01-2021 , 17:29   Re: [L4D1 & L4D2] Vomit Screen Fade [v1.0.0 | 31-August-2021]
Reply With Quote #2

Good idea.
Sev is offline
yabi
Senior Member
Join Date: Jun 2021
Location: Taiwan
Old 09-04-2021 , 09:15   Re: [L4D1 & L4D2] Vomit Screen Fade [v1.0.0 | 31-August-2021]
Reply With Quote #3

Good, thanks 馬特
yabi is offline
a2121858
Member
Join Date: Sep 2020
Old 09-27-2021 , 12:34   Re: [L4D1 & L4D2] Vomit Screen Fade [v1.0.1 | 04-September-2021]
Reply With Quote #4

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.
a2121858 is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 09-27-2021 , 13:42   Re: [L4D1 & L4D2] Vomit Screen Fade [v1.0.1 | 04-September-2021]
Reply With Quote #5

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).
__________________

Last edited by Marttt; 11-16-2021 at 21:54.
Marttt is offline
a2121858
Member
Join Date: Sep 2020
Old 09-28-2021 , 02:26   Re: [L4D1 & L4D2] Vomit Screen Fade [v1.0.1 | 04-September-2021]
Reply With Quote #6

I will try. Thank you. Mr. Marttt.
a2121858 is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 07-19-2022 , 19:21   Re: [L4D1 & L4D2] Vomit Screen Fade [v1.0.2 | 19-July-2022]
Reply With Quote #7

Plugin updated. (1.0.2)

Code:
1.0.2 (19-July-2022)
- Minor logic changes to fade duration.
__________________
Marttt is offline
ZBzibing
Senior Member
Join Date: Dec 2012
Old 10-22-2024 , 07:41   Re: [L4D1 & L4D2] Vomit Screen Fade [v1.0.2 | 19-July-2022]
Reply With Quote #8

If it is possible to prevent players from vomiting or disturbing witches, using idle bugs can solve this historical problem
__________________
Please forgive, If I'm not describing it accurately. I use google translate
Functional tests are all from L4D1, and are only keen to solve and fix various bugs of L4D1:
ZBzibing 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 18:53.


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