News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Coding

Reply
 
Thread Tools Display Modes
Old 21st Jul 2004, 05:21 AM   #1
Krylloan
Registered User
 
Join Date: Jul. 21st, 2004
Posts: 1
AI: TeamKilling

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
Krylloan is offline   Reply With Quote
Old 21st Jul 2004, 05:41 AM   #2
[SAS]Solid Snake
Registered User
 
[SAS]Solid Snake's Avatar
 
Join Date: Jun. 7th, 2002
Location: New Zealand
Posts: 2,633
Hello Simon, I see you have found your way into the coding BuF. [It's James] .

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.
__________________
I make the impossible possible ... ... ... to some extent.

Digital Confectioners

Last edited by [SAS]Solid Snake; 21st Jul 2004 at 05:45 AM.
[SAS]Solid Snake is offline   Reply With Quote
Old 21st Jul 2004, 06:34 AM   #3
Mychaeel
 
Join Date: Oct. 3rd, 2001
Location: Frankfurt/Main, Germany
Posts: 3,829
Quote:
Originally Posted by Krylloan
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?
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.
Mychaeel is offline   Reply With Quote
Old 21st Jul 2004, 06:56 AM   #4
[SAS]Solid Snake
Registered User
 
[SAS]Solid Snake's Avatar
 
Join Date: Jun. 7th, 2002
Location: New Zealand
Posts: 2,633
Quote:
Originally Posted by Mychaeel
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.
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.
__________________
I make the impossible possible ... ... ... to some extent.

Digital Confectioners
[SAS]Solid Snake is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 07:14 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer