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

[L4D2] Bot Delay


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Mortiegama
Senior Member
Join Date: Feb 2010
Plugin ID:
1504
Plugin Version:
1.21
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    This plugin will prevent survivor bots from rushing out of the saferoom before people have loaded into the game.
    Unapprover:
    Reason for Unapproving:
    Duplicate.
    Old 03-03-2010 , 20:17   [L4D2] Bot Delay
    Reply With Quote #1

    General

    This plugin requires Sourcemod 1.3 or higher

    Description

    This is an extremely crude plugin just to address one issue I've run into on my server. With sb_all_bots_team 1 on, the bots are rushing out of the saferoom before people have a chance to load into the game. Now survivors are ahead, infected didn't have time to get to a spawn point, and you don't have time to sit in the saferoom and prepare.

    All this plugin does is put a wait of 30 seconds on the start of the round. It's crude so if anyone wants to spruce it up feel free. There are more inclusive plugins like L4D Loading which have more/better features.

    Cvars

    • l4d_bd_botdelay (Enable 1, Disable 0), Delays the Survivor Bots from starting before the players load.
    • l4d_bd_botdelaytime (Default 30), How long after a player is in the game will the Bots start.
    • l4d_bd_autostart (Enable 1, Disable 0), Allows the Survivor Bots to automatically start if a player is not present.
    • l4d_bd_autostartdelay (Default 120), How long after the game starts should the Bots start.

    Installation

    • Download and copy BotDelay.smx to Addons/Sourcemod/Plugins

    Version History

    Version 1.21
    <*>Modified script to make sure Bots were stopped
    <*>Added CVar: l4d_bd_autostart
    <*>Added CVar: l4d_bd_autostartdelay
    Version 1.2 - 150 Views
    <*>Major renovation of scripting
    <*>Added CVar: l4d_bd_botdelay
    <*>Added CVar: l4d_bd_botdelaytime
    <*>Put checks in to make sure Bots won't start at start of the map
    Version 1.1 - 334 Views
    <*>Changed initial HookEvent from "round_start" to "item_pickup"
    <*>Got rid of the timer countdown to unfreeze bots
    <*>Set "item_pickup" to check if client is a bot
    Version 1.0
    <*>Original launch of the plugin

    Known Issues

    None

    Special Thanks

    -Thraka
    -mi123645
    Attached Files
    File Type: sp Get Plugin or Get Source (BotDelay.sp - 1157 views - 3.3 KB)

    Last edited by Mortiegama; 06-17-2010 at 18:29.
    Mortiegama is offline
    nuwit
    Junior Member
    Join Date: Dec 2008
    Old 03-03-2010 , 21:39   Re: [L4D2] Bot Delay
    Reply With Quote #2

    Plugin failed to compile! Please try contacting the author.

    Y_Y
    nuwit is offline
    mi123645
    Veteran Member
    Join Date: Feb 2009
    Old 03-03-2010 , 21:42   Re: [L4D2] Bot Delay
    Reply With Quote #3

    The problem with this plugin is that each server has different load times depending on their hardware. 30 seconds may or may not be suitable for the delay.

    I've already fixed this problem in my Infected Bots plugin. I used the event "item_pickup", which in this case, is triggered when a survivor gets an item. Since the survivor gets a pistol when they first spawn, it triggers the event.

    Set sb_all_bots_team to 1 in the event and you're golden.
    mi123645 is offline
    Visual77
    Veteran Member
    Join Date: Jan 2009
    Old 03-04-2010 , 05:26   Re: [L4D2] Bot Delay
    Reply With Quote #4

    This might work, but you will have to open the saferoom door and run out, before the bots will start moving.
    Using item_pickup might be a good idea aswell though.

    Code:
    #include <sourcemod>
    
    new Handle:g_hStopbots;
    
    public Plugin:myinfo = 
    {
            name = "L4D 2 Stop Bots",
            author = "Visual",
            description = "Prevents bots from opening the door before people have loaded",
            version = "1.0",
            url = "N/A"
    };
    
    public OnPluginStart()
    {
            HookEvent("round_start", Event_RoundStart);
            HookEvent("player_left_start_area", Event_PlayerLeftStartArea); 
    
            g_hStopbots = FindConVar("sb_move");
    }
    
    StopBots()
    {
            SetConVarString(g_hStopbots,"0");
    }
    
    public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
    {    
            StopBots();
    }
    
    StartBots()
    {
            SetConVarString(g_hStopbots,"1");
    }
    
    public Event_PlayerLeftStartArea(Handle:event, const String:name[], bool:dontBroadcast)
    {
            StartBots();
    }

    Last edited by Visual77; 03-04-2010 at 06:09.
    Visual77 is offline
    dacomb
    Senior Member
    Join Date: Oct 2009
    Old 03-06-2010 , 18:26   Re: [L4D2] Bot Delay
    Reply With Quote #5

    oh thank you!

    Will test out in a little bit and let you know how it goes.
    dacomb is offline
    dacomb
    Senior Member
    Join Date: Oct 2009
    Old 03-07-2010 , 15:55   Re: [L4D2] Bot Delay
    Reply With Quote #6

    plugin seemed to work perfectly. the only thing that bugged me was the chat spam about sb_bot_stop at the end and start of each round.

    If you can make that go away and perhaps create a config that would allow the option to customize the delay so folks with different server setups have some flexibility this would be perfection.

    otherwise... well done and thank you much! I can live with the chat spam.
    dacomb is offline
    Marchello
    Senior Member
    Join Date: Jan 2010
    Old 05-06-2010 , 03:43   Re: [L4D2] Bot Delay
    Reply With Quote #7

    It'd be nice if plugin wasn't printing to chat of changing sm_cvar.
    I mean if it'd be run silently.
    Marchello is offline
    IronWarrior
    Veteran Member
    Join Date: Jan 2010
    Old 05-06-2010 , 04:10   Re: [L4D2] Bot Delay
    Reply With Quote #8

    How does it put a wait of 30 seconds on at the start of the round, what does that mean in game?

    Are all players frozen, safe room door locked etc?

    If this really works, would love to add this to our 10vs10 server.

    Hate rushers at the start.
    IronWarrior is offline
    dirka_dirka
    Veteran Member
    Join Date: Nov 2009
    Old 05-06-2010 , 10:44   Re: [L4D2] Bot Delay
    Reply With Quote #9

    this wont stop human rushers.. only bot rushers. you need something like loading door or a readyup plugin to stop humans..
    dirka_dirka is offline
    EHG
    Senior Member
    Join Date: May 2009
    Location: 127.0.0.1
    Old 05-07-2010 , 05:13   Re: [L4D2] Bot Delay
    Reply With Quote #10

    Alternate version, requires human player on survivor team to enable bots.
    http://forums.alliedmods.net/showthread.php?t=125460

    Last edited by EHG; 05-08-2010 at 22:00.
    EHG 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 21:56.


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