Results 1 to 10 of 26

Thread: Renaming bots

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Corporal guiismiti's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    244
    Thanks
    121
    Thanked 42 Times in 31 Posts

    Renaming bots

    Quick question, just need a confirmation - is it possible to rename bots?

    I created this code just now:

    PHP Code:
        if(isdefined(self.isbot))
        {
            
    botname getSubStr(self.name03);
            
            if(
    botname == "bot")
            {
                
    number getSubStr(self.name3self.name.size);
                
    self.name "new name #"+number;
                
    self setclientcvar("name""new name #"+number);
                
    iprintlnBold("a bot has been renamed");
            }
        } 
    I'm aware setclientcvar would never work since bots don't have their own configurations like players do. Still, as a noob, it's worth the try.
    Also, it's weird that I can get self.name from a bot but cannot change it.
    I'm reading the printed message in game every time the code is read, so, it is reaching the renaming commands.

    Hmm... I actually just tried to use 'self.name = ' to rename myself ingame, and it didn't work. Any clues?
    Last edited by guiismiti; 2nd September 2014 at 05:06. Reason: updating
    set logfile 2

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
  •