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

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. [Support] Gsc Support #2

[Support] Gsc Support #2

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
6 Posts 6 Posters 1.6k 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.
  • n4th Offline
    n4th Offline
    n4th
    wrote on last edited by Mr. Android
    #1

    How can I spawn a bot automatically every game without me doing anything? Like the bot spawns in by itself every game? Is there like a function line command?

    n4th 1 Reply Last reply
    0
    • Sass Offline
      Sass Offline
      Sass
      Plutonium Staff
      wrote on last edited by Sass
      #2

      If you want to spawn one bot, the GSC for it is the following :

      self thread maps\mp\bots\_bot::spawn_bot(team);
      // team is either "axis", "allies" or "autoassign" (WITH QUOTES)
      

      If you need to spawn multiple bots, making a function that loops this line would be the way to go, like this :

      self thread spawnBots(NumberOfBots, NameOfTeam); 
      // example : spawnBots(3, "autoassign");
      
      spawnBots(count, team)
      {
          for(i = 0; i < count; i++)
          {
              self thread maps\mp\bots\_bot::spawn_bot(team); 
              wait .5;
          }
      }
      
      Ducxy Duui YT 2 Replies Last reply
      0
      • Sass Sass

        If you want to spawn one bot, the GSC for it is the following :

        self thread maps\mp\bots\_bot::spawn_bot(team);
        // team is either "axis", "allies" or "autoassign" (WITH QUOTES)
        

        If you need to spawn multiple bots, making a function that loops this line would be the way to go, like this :

        self thread spawnBots(NumberOfBots, NameOfTeam); 
        // example : spawnBots(3, "autoassign");
        
        spawnBots(count, team)
        {
            for(i = 0; i < count; i++)
            {
                self thread maps\mp\bots\_bot::spawn_bot(team); 
                wait .5;
            }
        }
        
        Ducxy Offline
        Ducxy Offline
        Ducxy
        wrote on last edited by
        #3

        Sass n4th yea just use a spawnbots script and call it on Init i believe. My friend skid made a script where the bots will be removed from the game one by one when more and more people join

        A Former User? 1 Reply Last reply
        0
        • Ducxy Ducxy

          Sass n4th yea just use a spawnbots script and call it on Init i believe. My friend skid made a script where the bots will be removed from the game one by one when more and more people join

          A Former User? Offline
          A Former User? Offline
          A Former User
          wrote on last edited by
          #4

          Ducxy I have done it by creating a player count variable and threading everything onplayerconnect. This way the bots join only when the first person joins and leave when subsequent people connect.

          1 Reply Last reply
          0
          • Sass Sass

            If you want to spawn one bot, the GSC for it is the following :

            self thread maps\mp\bots\_bot::spawn_bot(team);
            // team is either "axis", "allies" or "autoassign" (WITH QUOTES)
            

            If you need to spawn multiple bots, making a function that loops this line would be the way to go, like this :

            self thread spawnBots(NumberOfBots, NameOfTeam); 
            // example : spawnBots(3, "autoassign");
            
            spawnBots(count, team)
            {
                for(i = 0; i < count; i++)
                {
                    self thread maps\mp\bots\_bot::spawn_bot(team); 
                    wait .5;
                }
            }
            
            Duui YT Offline
            Duui YT Offline
            Duui YT
            wrote on last edited by
            #5

            Sass where do i put this

            self thread spawnBots(NumberOfBots, NameOfTeam);
            // example : spawnBots(3, "autoassign");

            spawnBots(count, team)
            {
            for(i = 0; i < count; i++)
            {
            self thread maps\mp\bots_bot::spawn_bot(team);
            wait .5;
            }
            }

            Codgogo_ 1 Reply Last reply
            0
            • Duui YT Duui YT

              Sass where do i put this

              self thread spawnBots(NumberOfBots, NameOfTeam);
              // example : spawnBots(3, "autoassign");

              spawnBots(count, team)
              {
              for(i = 0; i < count; i++)
              {
              self thread maps\mp\bots_bot::spawn_bot(team);
              wait .5;
              }
              }

              Codgogo_ Offline
              Codgogo_ Offline
              Codgogo_
              wrote on last edited by
              #6

              Duui YT maps \ mp \ bots

              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