Skip to content
  • 0 Unread 0
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. [Support] Bots in Zombies

[Support] Bots in Zombies

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
16 Posts 15 Posters 9.8k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • AndreasOmeir AndreasOmeir

    Is there any way for bots to be added in zombies? Playing offline zombies gets kinda lonely.

    JezuzLizard Offline
    JezuzLizard Offline
    JezuzLizard
    Plutonium Staff
    wrote on last edited by
    #4

    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.

    ImGodatDis 1 Reply Last reply
    0
    • H3X1C Offline
      H3X1C Offline
      H3X1C
      Plutonium Staff
      wrote on last edited by
      #5

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

      1 Reply Last reply
      0
      • FNAFBOYGAMING Offline
        FNAFBOYGAMING Offline
        FNAFBOYGAMING
        wrote on last edited by
        #6

        How do i apply this script

        1 Reply Last reply
        1
        • FragsAreUs Offline
          FragsAreUs Offline
          FragsAreUs
          Plutonium Staff
          wrote on last edited by
          #7

          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

          1 Reply Last reply
          0
          • FNAFBOYGAMING Offline
            FNAFBOYGAMING Offline
            FNAFBOYGAMING
            wrote on last edited by FNAFBOYGAMING
            #8

            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

            SnakeLegendary 1 Reply Last reply
            1
            • AndreasOmeir AndreasOmeir

              Is there any way for bots to be added in zombies? Playing offline zombies gets kinda lonely.

              yagobarrey Offline
              yagobarrey Offline
              yagobarrey
              wrote on last edited by
              #9

              AndreasOmeir lets pay together

              1 Reply Last reply
              0
              • FNAFBOYGAMING FNAFBOYGAMING

                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

                SnakeLegendary Offline
                SnakeLegendary Offline
                SnakeLegendary
                Contributor
                wrote on last edited by
                #10

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

                Dopemp3 1 Reply Last reply
                0
                • SnakeLegendary SnakeLegendary

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

                  Dopemp3 Offline
                  Dopemp3 Offline
                  Dopemp3
                  wrote on last edited by Dopemp3
                  #11

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

                  Aoteruz 1 Reply Last reply
                  0
                  • Acrillx Offline
                    Acrillx Offline
                    Acrillx
                    wrote on last edited by Acrillx
                    #12

                    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!!

                    1 Reply Last reply
                    0
                    • Dopemp3 Dopemp3

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

                      Aoteruz Offline
                      Aoteruz Offline
                      Aoteruz
                      wrote on last edited by
                      #13

                      Dopemp3 I'm pretty stupid when it comes to adding scripts to stuff so can you tell me a specific way to do that? Do I just create a new line and then paste?

                      Resxt 1 Reply Last reply
                      0
                      • Aoteruz Aoteruz

                        Dopemp3 I'm pretty stupid when it comes to adding scripts to stuff so can you tell me a specific way to do that? Do I just create a new line and then paste?

                        Resxt Offline
                        Resxt Offline
                        Resxt
                        Plutonium Staff
                        wrote on last edited by
                        #14

                        @Avengeful_Gaming https://forum.plutonium.pw/topic/16893/alpha-zombies-bo2-zombies-bots/

                        1 Reply Last reply
                        0
                        • JezuzLizard JezuzLizard

                          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.

                          ImGodatDis Offline
                          ImGodatDis Offline
                          ImGodatDis
                          wrote on last edited by
                          #15

                          JezuzLizard i mean you just need to open up console and write in it spawnBot 3 and same they cant move

                          1 Reply Last reply
                          0
                          • VulpesFox Offline
                            VulpesFox Offline
                            VulpesFox
                            wrote on last edited by
                            #16

                            and model is missing charecter i useing Bots not working

                            1 Reply Last reply
                            0

                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                            With your input, this post could be even better 💗

                            Register Login
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Unread 0
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Donate