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

[L4D1] Glow Item (White) [v1.0.4 | 19-June-2022]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Plugin ID:
7782
Plugin Version:
1.0.4
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    3 
    Plugin Description:
    Add a white outline glow effect to items on the map
    Old 09-07-2021 , 19:34   [L4D1] Glow Item (White) [v1.0.4 | 19-June-2022]
    Reply With Quote #1

    L4D1 ONLY

    L4D2 version here

    Description

    This plugin applies a white outline glow to some items making them easier to identify on the map.

    Warning

    Use carefully. This plugin may spawn too many entities depending on the number of items on the map and can cause a "ED_Alloc: no free edicts" crash.

    Features
    • Allow configuring the glow by classname.
    • Allow configuring which items should glow. (data config)
    • Allow configuring which teams should see the glow. (data config)
    • Allow configuring a blink effect to the entity with glow. (data config)
    • Allow configuring the fade distance to the entity with glow. (data config)
    • Fix spawner entities glow. (cvar)
    • Remove health cabinet glow on open when enabled.

    Preview



    Cvars

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

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

    // Remove glow from health cabinet after being opened.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d1_glow_item_health_cabinet "1"

    // Interval in seconds to toggle (start/stop) the glow.
    // -
    // Default: "0.3"
    // Minimum: "0.100000"
    l4d1_glow_item_interval "0.3"

    // Delete *_spawn entities when its count reaches 0.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d1_glow_item_remove_spawner "1" 
    Data file (data/l4d1_glow_item.cfg)
    PHP Code:
    // Attributes explained:
    //  "enable"        -> Apply plugin glow to entity. "0" = Disable, "1" = Enable.
    //  "team"          -> Which teams should see the outline glow. "-1" = Everyone, "0" = Unknown, "1" = Spectator, "2" = Survivors, "3" = Infecteds.
    //  "blink"         -> Add a blink effect (not team-based) to the entity with glow. "0" = No Blink, "1" = Soft Blink, "2" = Medium Blink, "3" = Hard Blink.
    //  "blink_random"  -> Apply a random color to the blink effect. "0" = OFF, "1" = ON.
    //  "blink_color    -> Blink effect color. Use three values between 0-255 separated by spaces. "<0-255> <0-255> <0-255>", e.g: "255 255 255". Ignored when "blink_random" is "1".
    //  "blink_alpha    -> Blink effect alpha. Value between 0-255.
    //  "fademax"       -> Distance from the nearest client at which the glow stop drawing. "0" = Disable.

    "l4d1_glow_item"
    {
        
    "default"
        
    {
            
    "enable"        "1"
            "team"          "2"
            "blink"         "2"
            "blink_random"  "0"
            "blink_color"   "0 0 0"
            "blink_alpha"   "0"
            "fademax"       "510"
        
    }

        
    "classnames"
        
    {
            
    // Primary Weapons - Slot 1
            // Tier 1
            // SMGs
            
    "weapon_smg"
            
    {
                
    "enable"        "1"
            
    }
            
    // Shotguns
            
    "weapon_pumpshotgun"
            
    {
                
    "enable"        "1"
            
    }

            
    // Tier 2
            // Rifles
            
    "weapon_rifle"
            
    {
                
    "enable"        "1"
            
    }
            
    // Shotguns
            
    "weapon_autoshotgun"
            
    {
                
    "enable"        "1"
            
    }
            
    // Snipers
            
    "weapon_hunting_rifle"
            
    {
                
    "enable"        "1"
            
    }

            
    // Secondary Weapons - Slot 2
            // Pistols
            
    "weapon_pistol"
            
    {
                
    "enable"        "1"
            
    }

            
    // Throwables - Slot 3
            
    "weapon_molotov"
            
    {
                
    "enable"        "1"
            
    }
            
    "weapon_pipe_bomb"
            
    {
                
    "enable"        "1"
            
    }

            
    // Health Items - Slot 4
            
    "weapon_first_aid_kit"
            
    {
                
    "enable"        "1"
            
    }

            
    // Health Items - Slot 5
            
    "weapon_pain_pills"
            
    {
                
    "enable"        "1"
            
    }

            
    // Carryables
            
    "weapon_gascan"
            
    {
                
    "enable"        "1"
            
    }
            
    "weapon_propanetank"
            
    {
                
    "enable"        "1"
            
    }
            
    "weapon_oxygentank"
            
    {
                
    "enable"        "1"
            
    }

            
    // Others
            
    "weapon_ammo"
            
    {
                
    "enable"        "1"
            
    }
            
    "prop_health_cabinet"
            
    {
                
    "enable"        "1"
            
    }
            
    "prop_fuel_barrel"
            
    {
                
    "enable"        "1"
            
    }
            
    "prop_car_alarm"
            
    {
                
    "enable"        "0"
            
    }
            
    "prop_physics"
            
    {
                
    "enable"        "0"
            
    }

            
    // Miniguns
            
    "prop_minigun"
            
    {
                
    "enable"        "1"
            
    }
            
    "prop_mounted_machine_gun"
            
    {
                
    "enable"        "1"
            
    }
        }

    Admin Commands
    • sm_glowinfo => Outputs to the chat the glow info about the entity at your crosshair. (z flag required)
    • sm_glowreload => Reload the glow configs. (z flag required)
    • sm_glowremove => Remove plugin glow from entity at crosshair. (z flag required)
    • sm_glowremoveall => Remove all glows created by the plugin. (z flag required)
    • sm_glowadd => Add glow to entity at crosshair. (z flag required)
    • sm_glowall => Add glow to everything possible. (z flag required)
    • sm_print_cvars_l4d1_glow_item => Print the plugin related cvars and their respective values to the console. (z flag required)

    Change Log

    Spoiler


    Known issues
    • Depending on the item angle, the glow may disappear when you reach nearby.

    This is weird game behaviour. I have found that by changing all the weapon angles to "0 0 0", with Stripper, and noticed that all glows were kept even when I was nearby. This explains why "weapon_ammo_spawn" is always glowing in most maps.

    Code:
    modify:
    {
        match:
        {
            "classname" "/weapon.*/"
        }
        replace:
        {
            "angles" "0.00 0.00 0.00"
        }
    }
    Notes
    • This plugin uses the prop_glowing_object entity (L4D1 only) to create glows, which are visible through walls by design.
    • Isn't possible to change the glow color. L4D1 has a default white color for glow while using this entity.
    • Hand-equipped items have the glow deactivated, restoring it when dropped.
    • I notice that some models weren't applying the glow on spawn (the entity was auto-destroyed in the next frame), so the default model on spawn is the "pills" model and after spawn they are changed to their parent model.
    • Found a bug that allowed to pickup equipped weapons, that's why there is an OnUse hook to block +USE on equipped weapons.
    • I won't support clone animation handling on this plugin, I did some trials but the result wasn't good enough.

    To Do
    • Add map based configs. (including hammerid config)

    Thank you!

    Related Plugins

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

    Installation
    • Put the "l4d1_glow_item.cfg" file in your "\addons\sourcemod\data\" folder.
    • Put the "l4d1_glow_item.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.
    Attached Files
    File Type: cfg l4d1_glow_item.cfg (3.1 KB, 186 views)
    File Type: sp Get Plugin or Get Source (l4d1_glow_item.sp - 304 views - 39.0 KB)
    __________________

    Last edited by Marttt; 01-15-2023 at 12:20.
    Marttt is offline
    Beatles
    Senior Member
    Join Date: Feb 2014
    Old 09-10-2021 , 01:28   Re: [L4D1] Glow Item (White) [v1.0.0 | 07-September-2021]
    Reply With Quote #2

    Good job, I love it
    Beatles is offline
    ReCreator
    Member
    Join Date: Nov 2017
    Location: Ukraine,Kyiv
    Old 09-11-2021 , 07:54   Re: [L4D1] Glow Item (White) [v1.0.0 | 07-September-2021]
    Reply With Quote #3

    Just an idea but maybe you get interested.
    In B4B when player looking on item and vocalize "Weapon/Molo/Granede over here", visible through walls tag appeared for a 10 seconds. Maybe you can realize something similar with glow in your plugin.
    __________________
    Sorry for my pure English...
    ReCreator is offline
    HarryPotter
    Veteran Member
    Join Date: Sep 2017
    Location: Taiwan, Asia
    Old 09-11-2021 , 12:43   Re: [L4D1] Glow Item (White) [v1.0.0 | 07-September-2021]
    Reply With Quote #4

    Quote:
    Originally Posted by ReCreator View Post
    Just an idea but maybe you get interested.
    In B4B when player looking on item and vocalize "Weapon/Molo/Granede over here", visible through walls tag appeared for a 10 seconds. Maybe you can realize something similar with glow in your plugin.
    someone did the similar one
    __________________
    HarryPotter is offline
    CrazMan
    Member
    Join Date: Jun 2022
    Old 06-19-2022 , 08:05   Re: [L4D1] Glow Item (White) [v1.0.3 | 25-September-2021]
    Reply With Quote #5

    Good day!

    Help fix the error in the plugin. There, the error gives out on the backlight of the minigun, it seems like if I'm not mistaken, but I don't know how to fix it.

    The plugin works, but it gives errors to the logs.

    HTML Code:
    L 06/19/2022 - 10:45:08: [SM]   [1] Line 786, E:\   L4D\sourcemod\scripting\l4d1_glow_item.sp::TimerGlow
    L 06/19/2022 - 10:45:09: [SM] Exception reported: Array index out-of-bounds (index -1, limit 2049)
    L 06/19/2022 - 10:45:09: [SM] Blaming: l4d1_glow_item.smx
    L 06/19/2022 - 10:45:09: [SM] Call stack trace:
    L 06/19/2022 - 10:45:09: [SM]   [1] Line 786, E:\   L4D\sourcemod\scripting\l4d1_glow_item.sp::TimerGlow
    L 06/19/2022 - 10:45:09: [SM] Exception reported: Array index out-of-bounds (index -1, limit 2049)
    L 06/19/2022 - 10:45:09: [SM] Blaming: l4d1_glow_item.smx
    L 06/19/2022 - 10:45:09: [SM] Call stack trace:
    L 06/19/2022 - 10:45:09: [SM]   [1] Line 786, E:\   L4D\sourcemod\scripting\l4d1_glow_item.sp::TimerGlow
    CrazMan is offline
    CrazMan
    Member
    Join Date: Jun 2022
    Old 06-19-2022 , 12:15   Re: [L4D1] Glow Item (White) [v1.0.4 | 19-June-2022]
    Reply With Quote #6

    Quote:
    Originally Posted by Marttt View Post
    I wasn't able to reproduce, but I added a safety check. Thanks for reporting. Download it again.
    Thank you for your quick response. Works well and without errors.
    CrazMan is offline
    KadabraZz
    Senior Member
    Join Date: May 2020
    Old 12-11-2022 , 23:27   Re: [L4D1] Glow Item (White) [v1.0.4 | 19-June-2022]
    Reply With Quote #7

    Code:
        "targetname"
        {
            "targetname-example"
            {
                "enable"        "1"
            }
        }
    
        "models"
        {
            "models/model-example.mdl"
            {
                "enable"        "1"
            }
        }
    Have those things been removed?
    KadabraZz is offline
    Sunyata
    Senior Member
    Join Date: Nov 2017
    Location: Wherever I am
    Old 01-09-2023 , 10:12   Re: [L4D1] Glow Item (White) [v1.0.4 | 19-June-2022]
    Reply With Quote #8

    Hey Marttt,

    I just tested out your l4d1 plugin here and I'm loving it ready. I'm just curious though: could your plugin be modified to also include a white glow effect on the Specials too? i.e. for the Hunter, Smoker, Boomer, Witch and Tank, and have this as an addition to the object glow effects you already have that reveals hidden objects behind wall etc.

    You made a suggestion in my post [link here] to try and use Silvers plugin, but unfortunately, his glow effects for his Specials only works for l4d2 game, which is no good for me, as I only play l4d1. But as an alternative idea to my opening post I made the other day, perhaps use a chat command instead of the bile-molly that players could use called "!Xray" which allows each player to choose to switch the x-ray feature on or off whenever they felt the need to use it.

    If this is something that could be included in your plugin in the near future. I would be most appreciative and grateful if you succeed in getting this extra feature working.

    In the meantime, I shall live in hope that this may be something that is doable

    Last edited by Sunyata; 01-09-2023 at 10:14.
    Sunyata is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 01-09-2023 , 10:21   Re: [L4D1] Glow Item (White) [v1.0.4 | 19-June-2022]
    Reply With Quote #9

    Hey @Sunyata,

    I've tried to add glow to commons and SI using the same method, but the result wasn't that good...

    different from L4D2, where the glow replicates the model (cause is the same entity),

    in L4D1 it is necessary to replicate the movements and poses of the entity (because it is another object, similar to the one it's done in LMC plugin)
    and unfortunately the glow entity from L4D1 can't replicate some properties that the original entity model has, so it looks pretty bad sometimes (desync), at least for commons.

    I may try adding support to them anyway, but I don't know when I will have time by now, since is a bit complicated.
    __________________
    Marttt is offline
    Sunyata
    Senior Member
    Join Date: Nov 2017
    Location: Wherever I am
    Old 01-09-2023 , 11:22   Re: [L4D1] Glow Item (White) [v1.0.4 | 19-June-2022]
    Reply With Quote #10

    Thanks for the quick reply Marttt. Let's hope you find a solution to this problem and it's something that can hopefully be worked out in the near future.

    I'm currently toying around with an idea where a player can use an "!Xray-Vision" chat command to enter spectator mode and view the locations of all Special infected hidden behind walls/objects using the glow effects already being used on the Infected ingame as shown when using spectate mode [as per this screenshot here]. Once in this mode, the player's bot remains stationary for a moment at its current location (using Cvar sb_stop 1), but I also need to keep the spectator's 'fly mode' disabled so that the player's view is always kept shown from the survivor characters' perspective, and allow the camera to swing about like the survivor's head normally would do in the game. To finally leave "x-ray-vision" mode, the player can quickly toggle the command again to exit it.

    I'm still working on ways on how to reconnect the player back to their survivor bot after exiting spectate mode. If I can get that part of the script to work properly, I'll post it back into my other thread later -even if the code isn't perfect and only half-baked even if I fail to complete this task, maybe some other more experienced coder here at the forums could hack it to be better than my meagre attempts.
    Sunyata is offline
    Reply



    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 05:49.


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