[Support] Bots in Zombies

Topic created · 12 Posts · 327 Views
  • Is there any way for bots to be added in zombies? Playing offline zombies gets kinda lonely.

  • @AndreasOmeir There were human never bots in zombies, so I doubt it

  • @luigistyle They could possibly be made similar to bot warfare (with GSC), but why bother.

  • @AndreasOmeir I have a bot script that lets you spawn in bots in zombies. They have no AI so all they do is stand around doing nothing but maybe you can port over the mp bot script. For some reason they will instantly bleed out on MoTD, but all other maps work.

    #include maps\mp\_utility;
    #include common_scripts\utility;
    #include maps\mp\zombies\_zm;
    #include maps\mp\zombies\_zm_utility;
    
    
    init()
    {
        level.bots_to_add = 1; //change this to add up to 7 bots to the game
        SetDvar( "scr_zm_enable_bots", "1" );
        level thread onPlayerConnect();
        thread add_bots();
    }
    
    onPlayerConnect()
    {
        for(;;)
        {
            level waittill("connected", player);
            player thread onPlayerSpawned();
        }
    }
    
    onPlayerSpawned()
    {
        self endon("disconnect");
        level endon("game_ended");
        for(;;)
        {
            self waittill("spawned_player");
        }
    }
    
    add_bots()
    {
        setdvar( "bot_AllowMovement", "1" );
        setdvar( "bot_PressAttackBtn", "1" );
        setdvar( "bot_PressMeleeBtn", "1" );
        num_bots = 0;
        wait 20;
        while ( num_bots < level.bots_to_add )
        {
       		wait 1;
        	zbot_spawn();
        	level.numberbotsadded++;
        	num_bots++;
        }
        players = get_players();
        i = 0;
        while ( i < players.size )
        {
            players[ i ] freezecontrols( 0 );
            i++;
        }
        while ( players.size < 2 )
    	{
    		wait 1;
    		players = get_players();
    	}
        flag_set( "start_zombie_round_logic" );
    }
    
    zbot_spawn()
    {
        spawnpoints = getstructarray( "initial_spawn_points", "targetname" );
        spawnpoint = getfreespawnpoint( spawnpoints );
        bot = addtestclient();
        if ( !isDefined( bot ) )
        {
            return;
        }
        bot.pers[ "isBot" ] = 1;
        bot.equipment_enabled = 0;
        yaw = spawnpoint.angles[ 1 ];
        bot thread zbot_spawn_think( spawnpoint.origin, yaw );
        return bot;
    }
    
    zbot_spawn_think( origin, yaw )
    {
        self endon( "disconnect" );
        for ( ;; )
        {
            self waittill( "spawned_player" );
            //self setorigin( (2170.5, 4660.37, -299.875) ); // change to set their spawn location
            //angles = ( 0, yaw, 0 );
            //self setplayerangles( angles );
        }
    }
    

    I guess this could also be used to test things since they functionally simulate an actual player joining/spawning.

  • Technically they can be spawned in but they have no ai so are useless.

  • How do i apply this script

  • there is no need to even use this script because of the fact there is no ai movment made for it so they wont do anything

  • I dont care about them not moving i asked how can i get this mod not *"DoEs tHeSe bOts mOvE?" I just wanna know how to apply bots in zombies for testing perposes etc. Thank you in advance

  • @AndreasOmeir lets pay together

  • @FNAFBOYGAMING Have you found a way yet to apply the script? I would love to use this script.

  • @SnakeLegendary I would assume you just add this script to your "_clientids.gsc" file, and you should be good to go!

  • just find a way to get this script and then edit the code or base your own bot script of this but with map knowledge and of course the ability to move and stuff then boom you have a bot script with decent bots that move!!

Log in to reply