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

[L4D2]Flashbang Boomer


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Dr_Newbie
Junior Member
Join Date: Jul 2014
Plugin ID:
4948
Plugin Version:
1
Plugin Category:
Fun Stuff
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Add flashbang effect when boomer is killed
    Old 12-10-2015 , 07:14   [L4D2]Flashbang Boomer
    Reply With Quote #1



    ConVar:
    sm_flashbangboomer: Enable or disable this plugin. 1 = ON ; 0 = OFF

    Note:
    You will need ''IsTargetInSightRange.inc'' to compile this plugin.

    Preview:
    https://www.youtube.com/watch?v=_tMwXHj0f58
    Attached Files
    File Type: sp Get Plugin or Get Source (flashbangboomer.sp - 798 views - 3.3 KB)
    File Type: smx flashbangboomer.smx (7.4 KB, 594 views)
    File Type: inc IsTargetInSightRange.inc (1.7 KB, 717 views)

    Last edited by Dr_Newbie; 12-10-2015 at 10:33.
    Dr_Newbie is offline
    jess
    Member
    Join Date: Aug 2015
    Location: mb
    Old 12-10-2015 , 09:34   Re: [L4D2]Flashbang Boomer
    Reply With Quote #2

    You should also include whichever file is associated with #include <IsTargetInSightRange> as it's required to compile this plugin.
    __________________
    L4D2 Loot RPG
    Steam
    jess is offline
    Dr_Newbie
    Junior Member
    Join Date: Jul 2014
    Old 12-10-2015 , 10:32   Re: [L4D2]Flashbang Boomer
    Reply With Quote #3

    Quote:
    Originally Posted by jess View Post
    You should also include whichever file is associated with #include <IsTargetInSightRange> as it's required to compile this plugin.
    Thank you for reminding.
    Dr_Newbie is offline
    jess
    Member
    Join Date: Aug 2015
    Location: mb
    Old 12-10-2015 , 10:32   Re: [L4D2]Flashbang Boomer
    Reply With Quote #4

    Thanks for adding it =) I wanted to check it out and didn't realize it was a public inc!
    __________________
    L4D2 Loot RPG
    Steam
    jess is offline
    bazrael
    Senior Member
    Join Date: Jan 2010
    Location: Where Lucy became superw
    Old 12-10-2015 , 20:46   Re: [L4D2]Flashbang Boomer
    Reply With Quote #5

    Can survivors avoid flash if they are behind a wall or looking opposite direction of boomer?
    __________________
    Kill all the son of a bitches, that's my official instructions.
    L4Dε Modified Talker
    bazrael is offline
    jess
    Member
    Join Date: Aug 2015
    Location: mb
    Old 12-10-2015 , 23:52   Re: [L4D2]Flashbang Boomer
    Reply With Quote #6

    Theoretically, you could use https://sm.alliedmods.net/api/index....d=show&id=428& and https://sm.alliedmods.net/api/index....ad=show&id=44& and draw a line between the survivor and the boomer - you would still need to detect collision in there, though.
    __________________
    L4D2 Loot RPG
    Steam
    jess is offline
    DeathChaos25
    Senior Member
    Join Date: Jan 2014
    Location: Puerto Rico
    Old 12-11-2015 , 14:04   Re: [L4D2]Flashbang Boomer
    Reply With Quote #7

    Try this, I used it on a plugin for Survivor Bots using Grenades, however I have restricted them to only using them on Tanks, and I do a check to make sure there is not a single entity between the bot and the tank, with this bit of code from Gear Transfer;
    PHP Code:
    static bool:IsVisibleTo(Float:position[3], Float:targetposition[3])
    {
        
    decl Float:vAngles[3], Float:vLookAt[3];
        
        
    MakeVectorFromPoints(positiontargetpositionvLookAt); // compute vector from start to target
        
    GetVectorAngles(vLookAtvAngles); // get angles from vector for trace
        
        // execute Trace
        
    new Handle:trace TR_TraceRayFilterEx(positionvAnglesMASK_ALLRayType_Infinite_TraceFilter);
        
        new 
    bool:isVisible false;
        if (
    TR_DidHit(trace))
        {
            
    decl Float:vStart[3];
            
    TR_GetEndPosition(vStarttrace); // retrieve our trace endpoint
            
            
    if ((GetVectorDistance(positionvStartfalse) + 25.0) >= GetVectorDistance(positiontargetposition))
            {
                
    isVisible true// if trace ray length plus tolerance equal or bigger absolute distance, you hit the target
            
    }
        }
        else
        {
            
    LogError("Tracer Bug: Player-Zombie Trace did not hit anything, WTF");
            
    isVisible true;
        }
        
    CloseHandle(trace);
        
        return 
    isVisible;
    }

    public 
    bool:_TraceFilter(entitycontentsMask)
    {
        if (!
    entity || entity <= MaxClients || !IsValidEntity(entity)) // dont let WORLD, or invalid entities be hit
        
    {
            return 
    false;
        }
        return 
    true;

    This uses the Player Origin for both the bot and the tank, so in this plugin's case it would need the player origin for the Boomer and Survivors.
    __________________

    Last edited by DeathChaos25; 12-11-2015 at 14:07.
    DeathChaos25 is offline
    Alexmy
    Senior Member
    Join Date: Oct 2014
    Location: Russian Federation
    Old 12-12-2015 , 04:30   Re: [L4D2]Flashbang Boomer
    Reply With Quote #8

    How to adjust the radius of the outbreak?

    _____________________________________

    Last edited by Alexmy; 12-28-2015 at 22:23.
    Alexmy is offline
    phoenix0001
    Senior Member
    Join Date: Apr 2010
    Location: China
    Old 04-22-2017 , 04:31   Re: [L4D2]Flashbang Boomer
    Reply With Quote #9

    How to extend the flash time?
    __________________
    I like this BBS sharing of spirit

    I come from China, my English is poor
    phoenix0001 is offline
    ricksfishin
    Senior Member
    Join Date: Oct 2017
    Old 04-07-2018 , 16:51   Re: [L4D2]Flashbang Boomer
    Reply With Quote #10

    Working version This last around 5 second's.

    I changed this BfWriteShort(hFadeClient, iDuration - iFullBlindDuration);

    To this BfWriteShort(hFadeClient, iDuration = 03850|iFullBlindDuration);

    Change color: PerformFade(iClient, during, {127, 235, 212}, 255);
    Attached Files
    File Type: smx flashbangboomer.smx (7.6 KB, 405 views)
    File Type: sp Get Plugin or Get Source (flashbangboomer.sp - 446 views - 3.3 KB)
    File Type: inc IsTargetInSightRange.inc (1.7 KB, 375 views)
    ricksfishin 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 02:37.


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