1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

KAG NPCs do not do anything.

Discussion in 'Server Help' started by kaggit, Mar 2, 2015.

  1. kaggit

    kaggit Bison Rider

    Messages:
    176
    Hey lads.
    I'm trying to make an adventure/dungeon/challenge map and I think it would be useful if there were knights and archers trying to kill you along the way. However I've noticed when spawning knights and archers in on a server using !knight and !archer they do jack all. I downloaded a template to make maps with and it has something called knight mook and archer mook, something like that. Would someone be able to tell me what these are and how to get a knight/archer to try and kill me?
     
  2. blackjoker77777

    blackjoker77777 Haxor Tester
    1. Zen Laboratories

    Messages:
    441
    well, spawning knights using !knight command or spawning archers using !archer won't help bro. when using those two commands you are just spawning those blobs (which means only sprite and the emoticons ) that's because in the "knight.cfg" and in the "archer.cfg" the brain script used there doesn't have any AI moves or controls (they can't think,move or fight with their own.But they can do emoticons) so to solve this I would suggest the easiest way which is to spawn new bots that could react and fight the player using !bot command.
    tbh I have no idea what are those "mooks" (I had never used them :p) but I think you need a precise gamemod (I think it's "challenge" not sure tho) so that those mooks would work.(or maybe you need to mod some maps files).
     
    AmestriStephen likes this.
  3. BC

    BC Bison Rider

    Messages:
    70
    Open this file:
    Base/Entities/Characters/Knight/KnightLogic.as

    Find the line that says void onInit( CBlob@ this ) then paste the following code within the curly brackets.

    Here is the code:
    this.getBrain().server_SetActive( true );
     
  4. kaggit

    kaggit Bison Rider

    Messages:
    176
    void onInit( CBlob@ this.getBrain().server_SetActive( true );)

    Like that?

    --- Double Post Merged, Mar 3, 2015, Original Post Date: Mar 3, 2015 ---
    I tried out the bot command and it was rather interesting.
    I did !bot. Nothing happens. I do !botknight. Nothing happens. Then I noticed someone joined my server. his name was harry. I tell him I'm testing and he doesn't respond so I keep trying. I do bot again and harry2 joins the server. by then I've figured out that !bot makes a dude named harry join the server. hes only a builder and he doesn't do anything except run when I slash him. Pretty interesting tho. gave me a good laugh.

    Is there any other way to use !bot? I mean is that the only command there is. Nothing like !bot_knight or something?
     
  5. BC

    BC Bison Rider

    Messages:
    70
    No, try adding the code like this:
    void onInit( CBlob@ this )
    {
    this.getBrain().server_SetActive( true );

    Now when you spawn a knight using !knight, he should attack nearby enemies.
     
    Last edited: Mar 3, 2015
  6. kaggit

    kaggit Bison Rider

    Messages:
    176
    I officially love you. Thank you so much for this. I bet you I'll be hosting the first server that has this :D
    Will this same method work for archers and builders? Or at least archers?
     
  7. BC

    BC Bison Rider

    Messages:
    70
    You're welcome :)
    It should work for archers, but the archers won't do much without arrows.
    It kinda works for builders, but I remember them being somewhat useless :P
     
  8. kaggit

    kaggit Bison Rider

    Messages:
    176
    Just tried archers and they only ran away. I don't think they had any arrows tho. If I spawned them with arrows would that help?
     
  9. blackjoker77777

    blackjoker77777 Haxor Tester
    1. Zen Laboratories

    Messages:
    441
    lol , first his name is Henry and he is not a player he is the bot you spawned :p
     
  10. kaggit

    kaggit Bison Rider

    Messages:
    176
    Yeah I figured. What I meant when I said "a dude named Harry joins" was it would say "Harry has connected, Harry has joined blue team" every time I did !bot. Thanks for the help guys. Much appreciated.