Results 1 to 10 of 65

Thread: Changing map on MeatBot (CoD 2)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    ... connecting Jeta1's Avatar
    Join Date
    Feb 2015
    Location
    West Michigan
    Posts
    8
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by guiismiti View Post
    oh, the menus, I forgot about that. I had problems with it when I tried to set the bots to use all rifles while I used the regular weapons menu.


    And, about the scoreboard, I changed the logic I used there.

    - If there are players online after the 10 seconds of scoreboard displaying, the map will change;
    - If there are no players online after the 10 seconds of scoreboard displaying (i. e. all players disconnected during the scoreboard - and, believe me, this happens a lot), the scoreboard will stay there until someone connects. Then, the map changes.
    I got the sprint working by changing
    self UseButtonPressed
    to
    self MeleeButtonPressed in the _sprint.gsc (three entries)
    then changed the localized string. I loose a visual of the weapon melee when moving, but I will sacrifice for the sprint.

    I'll work on the scoreboard display (currently not at all).

    Thanks again for the help.
    TnT Jeta1

  2. #2
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by Jeta1 View Post
    I got the sprint working by changing
    self UseButtonPressed
    to
    self MeleeButtonPressed in the _sprint.gsc (three entries)
    then changed the localized string. I loose a visual of the weapon melee when moving, but I will sacrifice for the sprint.

    I'll work on the scoreboard display (currently not at all).

    Thanks again for the help.
    TnT Jeta1
    You don't need to change the key they use to sprint - create a method to determine live players from bots and then don't run the sprint code on bots.

    This is the method I use:

    Code:
    isbot( player )
    {
     
      if( GetSubStr( player.name, 0, 3 ) == "bot") return true; 
     
      return false;
    }
    Then, use that to differentiate bots from people, and stop bots running the sprint script.

  3. #3
    Corporal guiismiti's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    244
    Thanks
    121
    Thanked 42 Times in 31 Posts
    Quote Originally Posted by Tally View Post
    This is the method I use:

    Code:
    isbot( player )
    {
     
      if( GetSubStr( player.name, 0, 3 ) == "bot") return true; 
     
      return false;
    }
    Meatbot sets the .isbot attribute when a bot is added, so, you can just use
    Code:
    if(player.isbot)
    set logfile 2

  4. #4
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by guiismiti View Post
    Meatbot sets the .isbot attribute when a bot is added, so, you can just use
    Code:
    if(player.isbot)
    I have found that method not 100% reliable. But my method works infallibly.

  5. #5
    Corporal guiismiti's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    244
    Thanks
    121
    Thanked 42 Times in 31 Posts
    Quote Originally Posted by Tally View Post
    I have found that method not 100% reliable.
    How so?

    10char
    set logfile 2

  6. #6
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    Well I personally used a combination of:
    - checking the connecting players name
    - get the GUID
    - set a variable on connect (since bots do not change anything)

    so to say:

    Code:
    bot = addTestClient();
    
    if( !isDefined( bot ) )
        continue; // try again..
    
    assert( isSubStr( bot.name , "bot" ) );
    assert( bot getGuid() == "0" ) );
    
    bot.isBot = true;
    bot.pers["bot"] = true;

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •