Raised This Month: $32 Target: $400
 8% 

[L4D1 & L4D2] Smoker Cloud Screen Fade [v1.0.2 | 02-February-2023]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Plugin ID:
8149
Plugin Version:
1.0.2
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Adds a blind fade effect while in Smoker cloud
    Old 08-10-2022 , 22:02   [L4D1 & L4D2] Smoker Cloud Screen Fade [v1.0.2 | 02-February-2023]
    Reply With Quote #1

    Description

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

    Can be used to make Smokers more challenging.

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

    Cvars

    A configuration file named "l4d_cloud_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_cloud_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_cloud_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: "20 20 20"
    l4d_cloud_screen_fade_color "20 20 20"

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

    // Fade in (end) duration in seconds.
    // -
    // Default: "0.5"
    // Minimum: "0.000000"
    l4d_cloud_screen_fade_in_duration "0.5"

    // How long will the trigger area exist before it disappears.
    // -
    // Default: "14.0"
    // Minimum: "0.000000"
    l4d_cloud_screen_fade_life "14.0"

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

    // Fade trigger area size.
    // -
    // Default: "100.0"
    // Minimum: "0.000000"
    l4d_cloud_screen_fade_size "100.0"

    // Which teams should be affected by the plugin.
    // 0 = NONE, 1 = SURVIVOR, 2 = INFECTED, 4 = SPECTATOR, 8 = HOLDOUT.
    // Add numbers greater than 0 for multiple options.
    // Example: "3", enables for SURVIVOR and INFECTED.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "15.000000"
    l4d_cloud_screen_fade_team "1" 
    Related Game Cvars
    • z_cough_cloud_expire => You don't cough after a smoke cloud has existed this long. (default: 14)
    • z_cough_cloud_radius => How far from center of smoke cloud makes you cough. (default: 175)

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

    Change Log

    Spoiler


    To-Do
    • Trace to check if clients are in a valid position.

    Notes
    • Bots aren't affected by the plugin.
    • Fade can be triggered between walls.

    Thank you!

    Related Plugins

    Recommended Plugins

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

    Installation
    • Put the "l4d_cloud_screen_fade.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_cloud_screen_fade.sp - 408 views - 24.1 KB)
    __________________

    Last edited by Marttt; 02-12-2023 at 15:48.
    Marttt is offline
    yabi
    Senior Member
    Join Date: Jun 2021
    Location: Taiwan
    Old 08-11-2022 , 02:46   Re: [L4D1 & L4D2] Smoker Cloud Screen Fade [v1.0.0 | 10-August-2022]
    Reply With Quote #2

    Really like this type of plugin, thanks Matt
    yabi is offline
    Toranks
    Senior Member
    Join Date: Dec 2021
    Location: Spain
    Old 08-11-2022 , 03:10   Re: [L4D1 & L4D2] Smoker Cloud Screen Fade [v1.0.0 | 10-August-2022]
    Reply With Quote #3

    Genial!
    Could you add an option to activate it only in third person? This would compensate that in third person the smoker's smoke has no effect
    Toranks is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 08-11-2022 , 07:48   Re: [L4D1 & L4D2] Smoker Cloud Screen Fade [v1.0.0 | 10-August-2022]
    Reply With Quote #4

    Quote:
    Originally Posted by Toranks View Post
    Could you add an option to activate it only in third person?
    I see no reason to add this as a feature, I tested and is working in both first/thirdperson.
    __________________
    Marttt is offline
    Toranks
    Senior Member
    Join Date: Dec 2021
    Location: Spain
    Old 08-11-2022 , 08:06   Re: [L4D1 & L4D2] Smoker Cloud Screen Fade [v1.0.0 | 10-August-2022]
    Reply With Quote #5

    Quote:
    Originally Posted by Marttt View Post
    I see no reason to add this as a feature, I tested and is working in both first/thirdperson.
    Ok, no matter. Perhaps simpler is a command to turn this effect on/off for individual players, similar to sm_cloudfade. Could you add it when you do the Team filter that you have in ToDo?
    Toranks is offline
    HarryPotter
    Veteran Member
    Join Date: Sep 2017
    Location: Taiwan, Asia
    Old 08-11-2022 , 09:53   Re: [L4D1 & L4D2] Smoker Cloud Screen Fade [v1.0.0 | 10-August-2022]
    Reply With Quote #6

    another cool plugin
    __________________
    HarryPotter is offline
    Maur0
    Senior Member
    Join Date: Aug 2020
    Old 08-11-2022 , 18:57   Re: [L4D1 & L4D2] Smoker Cloud Screen Fade [v1.0.0 | 10-August-2022]
    Reply With Quote #7

    Very Nice!
    Maur0 is offline
    alasfourom
    Senior Member
    Join Date: Feb 2022
    Location: Saudi Arabia
    Old 08-11-2022 , 21:54   Re: [L4D1 & L4D2] Smoker Cloud Screen Fade [v1.0.1 | 11-August-2022]
    Reply With Quote #8

    Excellent plugin Marttt
    __________________
    alasfourom is offline
    HarryPotter
    Veteran Member
    Join Date: Sep 2017
    Location: Taiwan, Asia
    Old 02-01-2023 , 05:51   Re: [L4D1 & L4D2] Smoker Cloud Screen Fade [v1.0.1 | 11-August-2022]
    Reply With Quote #9

    Shoud we set model to "trigger_multiple"?
    Because I modify "l4d_cloud_screen_fade_size 200" and I feel like trigger area size is not changed.

    PHP Code:
        int entity CreateEntityByName("trigger_multiple");
        
    ge_bTriggerFade[entity] = true;
        
    DispatchKeyValue(entity"spawnflags""1"); // Clients
        
    DispatchKeyValue(entity"allowincap""1"); // Yes
        
    DispatchKeyValueVector(entity"origin"vPos);
        
    DispatchSpawn(entity);
        
    SetEntityModel(entity"models/props/cs_militia/silo_01.mdl"); 
    __________________

    Last edited by HarryPotter; 02-01-2023 at 05:58.
    HarryPotter is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 02-01-2023 , 10:19   Re: [L4D1 & L4D2] Smoker Cloud Screen Fade [v1.0.1 | 11-August-2022]
    Reply With Quote #10

    Plugin updated. (1.0.2)

    Code:
    1.0.2 (11-August-2022)
    - Fixed resizing not working. (thanks "HarryPotter" for reporting)
    __________________

    Last edited by Marttt; 02-12-2023 at 15:48.
    Marttt 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 06:20.


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