1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

AI: TeamKilling

Discussion in 'Programming' started by Krylloan, Jul 21, 2004.

  1. Krylloan

    Krylloan New Member

    Joined:
    Jul 21, 2004
    Messages:
    1
    Likes Received:
    0
    I have a mod based on xTeamGame. I want the AI to attack both friendly and enemy players, but not attack enemies with more than 400 health. I would also like to prevent the bots from complaining about "same team" attacks. Does anyone know how I could do this?

    Thanks
    Simon
     
  2. [SAS]Solid Snake

    [SAS]Solid Snake New Member

    Joined:
    Jun 7, 2002
    Messages:
    2,633
    Likes Received:
    0
    Hello Simon, I see you have found your way into the coding BuF. [It's James] :lol:.

    Okay, what you need to do here is to assign specific Squad AI which you will of course will have to write. If you take a look into a class such as xBombingRun or xCTF or something along those lines, you will notice in the defaultproperties with something like SquadAI or TeamAI or something which negates that the bots should be using a particular script as their AI basis.

    This AI class serves as to what the bots should do, not how to do it. So essentially you are only editing what you need to be, and not messing around with non specific things such as bot movement, bot aiming and so forth.

    Right, if you followed that lead, you might find a AI class which was written for say CTF or Bombing Run. From my dealings with Bot AI in the past, it appears to be that each bot has it's own AI, and that it is not a single AI that runs all of the bots. Erm, what I mean here is that each bot is though of as a seperate entity. I solved this issue for one of my gametypes earlier on (Capture The Beer... never released, still sits on my HDD.) by creating linked lists of all the bots. Then a central AI controlled the small AI, and since the central AI was able to collect infomation from all of the bots, some rather devious team AI was able to be programmed ... although it would appear the bots were cheating since there would be NO way that a bot would know that his/her teammate was carrying the beer and needed help half a map away!

    But anyways, you should be now able to find your way through some TeamAI code which you can have a look in. The Bot AI is pretty simple really, if x is something then do this ... or that. You can make some pretty complex, emergent behaviour like I did with Capture The Beer, but you run into some weird and complicated behaviours. Out of no where my bots were suddenly throwing away beers for no reason. When I went to pick it up, a bot would snipe me in the head. For some reason, the bots decided that creating ambushes would lead them to victory... of course it wouldn't since scoring points is done by getting beer back to your base! Where that came from... I don't know.

    Another good website that you should check out if you want/wish to learn more about editing Unreal is lovingly called the Wiki.

    http://wiki.beyondunreal.com

    It has a wealth of information that has been submitted by the members here. A lot of questions will have answers buried within this site.

    http://udn.epicgames.com

    This is the UDN. It also contains a lot of useful information, and often for more advanced Unrealscripters, we come to realised that a lot of our mod ideas have to also be made sure that it can work within the current technology restraints that Unreal does have, although few. I regularly consult this website to form ideas on how I am to solve specific issues.
     
    Last edited: Jul 21, 2004
  3. Mychaeel

    Mychaeel New Member

    Joined:
    Oct 3, 2001
    Messages:
    3,830
    Likes Received:
    0
    Hmm. Why do you extend your game type from xTeamGame if you don't want your bots to play in teams in the first place?

    In any case: Overwrite TeamInfo.FriendlyToward to control whom bots attack.
     
  4. [SAS]Solid Snake

    [SAS]Solid Snake New Member

    Joined:
    Jun 7, 2002
    Messages:
    2,633
    Likes Received:
    0
    Ahh, we coded this project together Mychaeel. The idea of this mod was a reversed team game. Basically, what you do in this game type is that players are split up into two. Shooting your own team member hurts him, while shooting an enemy team member heals him. The way to win is to kill your entire team as much as you can, of course the other team is going to heal you... it's insane. Absolutely insane. Anyways that was way I decided to subclass of the xTeamGame.
     

Share This Page