SlideShare a Scribd company logo
UT3 Bots – Getting Started Guide<br />Have you ever played a first person shooter? Then you've probably played against computer controlled players known as quot;
botsquot;
 which are computer programs designed with artificial intelligence. Up until now the only way to do create your own bot for a game like Unreal Tournament 3 was to learn a bunch of C++ and complicated AI routines. Of course, what you really want to do is code up your bot using C# or VB and Visual Studio Express. So here is a way to do just that.<br />Your First Bot<br />Once you've created a new bot you'll have a very basic class with just a constructor and an overridden ProcessActions() method.<br />using System;<br />using System.Collections.Generic;<br />using System.Linq;<br />using System.Text;<br />using UT3Bots;<br />using UT3Bots.UTItems;<br />using System.Threading;<br />using UT3Bots.Communications;<br />namespace UT3UserBot<br />{<br />public class MyBot : UTBot<br />{<br />//Constructor for your bot<br />public MyBot() : base (quot;
174.133.254.34quot;
, quot;
Sitting Duckquot;
, BotMesh.Harbinger, BotColor.Red)<br />{<br />}<br />//Method to control the bot once it has connected to the server<br />protected override void ProcessActions()<br />{<br />//Add code here to perform some actions at specific intevals<br />}<br />}<br />}<br />Setting Up Your Bot<br />The first thing you need to do for your bot is configure it with a look and feel, and then actually connect to the server and get in the game. This is pretty straightforward, all you need to do is alter the parameters that are getting sent up to the base bot class in the constructor.<br />Server IPAddress - The first parameter is the IPAddress of the server to connect to. By default this points to the UT3Bots server we have running on the internet, you'll need to alter this to point to the server you need to connect to.
Name – The name of your bot will be seen on the Visualizer and in game.
Bot Mesh – This is the appearance of your bot on the server.
Bot Color – This is the color of your bot.Now you are ready to join a UT3 game.<br />Pressing F5 will build and run your bot. The bot project will load up a little console application which provides info about what your bot is doing.<br />Bot's First SightNow that we have a bot in the game we need to make it actually do something. The first thing we are going to make it do is move to a UTNavPoint. This is a location in the game which might hold something interesting. A series of UTNavPoints provide a path through the level to interesting items. A bot can travel around a game level by moving from one UTNavPoint to another. <br />Within the game framework (UT3RemoteBot.dll), an instance of the UTVector class can be used to express the actual location of something. The location of a UTNavPoint is given by its Location property, which is given as a UTVector value. <br />Our bot needs to have a way of keeping track of where it is going so in the UT3UserBot class create a new private UTVector called destinationLocation<br />C#<br />private UTVector destinationLocation;<br />We want our bot to head towards the first navpoint that it “sees”. To do this we place the following code into the ProcessActions() method. <br />C# <br />this.destinationLocation = this.GameState.NavPointsVisible[0].Location;<br />The GameState property of our bot contains information on the current state of the game. NavPointsVisible is a list of references to UTNavPoint instances which refer to all of the UTNavPoints a bot can currently see. The above code simply takes the UTVector at position 0 (the first navigation point your bot can see) and sets destinationLocation to refer to it. <br />So at this point the bot has identified the location it wants to move towards, now we have to make it move in that direction. <br />Bot's First Steps Now we are going to make our bot move to the destination it has selected. Place the following code into the ProcessActions() method just below the code written in the previous example. <br />C#<br />this.Commands.RunTo(this.destinationLocation); <br />The Commands property provides a set of methods which are the commands that your program can give to the bot. There are a wide range of commands, some of which are listed below. For full details you should investigate the API reference. <br />Jump() - Jumps in the air
RotateBy() - Rotates by a specific number of degrees
RunTo() - Runs to a specific location
StartFiring() - Attacks a target or location
StopFiring() - Stops the bot from shooting
StrafeTo() - Strafes to a specific location while looking at anotherThe RunTo() command is provided with a destination location. When this method is called your bot will start running towards the destination. <br />If you execute this program you will see your bot start running towards a navigation point.<br />Bot's First ShotFor the purpose of this example we will next make our bot shoot at the location it is running towards, it is recommended that you change this when creating your own implementation as shooting at an empty UTNavPoint is unlikely to get you many frags. <br />Place the following code into the ProcessActions() method just below the code written in the previous example. <br />C#<br />this.Commands.StartFiring(this.destinationLocation, false);<br />If you execute the program you will see that your bot now shoots at the location as it runs towards it. It will continue running and shooting until you call a method to instruct it to stop, or it runs out of ammo! <br />Place the following code into the ProcessActions() method just below the code written in the previous step. <br />C# <br />this.Commands.StopFiring();<br />Your bot will now stop shooting.<br />So you now know how to get your bot to do something in the game. Running around and shooting things is as easy as using the GameState property to access what your bot can see, and the Commands property to call methods that perform actions.<br />Bot's First Reaction<br />Now we are going to make the bot react to things that happen in the game. This is done by subscribing to any of the events that the bot exposes through its Events property. We normally want to subscribe to the game events as soon as the bot starts, so that we get all the juicy information that we can use to make a clever bot. You can do this by attaching an event handler to an event in the constructor for your bot.<br />In this example we will subscribe to the OnSpawned event which is trigged whenever the bot spawns in the game, whether this is the first time, or after it has died.<br />Place the following code into the constructor of the MyBot class.<br />C# <br />this.Events.OnSpawned += new EventHandler<BotSpawnedEventArgs>(Events_OnSpawned);<br />You also need to add a new method to the class that will be called when the bot spawns.<br />Place the following method code into the MyBot class.<br />C# <br />void Events_OnSpawned(object sender, BotSpawnedEventArgs e)<br />{<br />this.Commands.PerformEmote(Emote.PelvicThrust);<br />}<br />Your bot will now start performing some fetching pelvic thrusts whenever it spawns in the game. This won't actually help you get any extra frags, but maybe it'll start a new craze!<br />There are many different events you can attach handlers to which will allow you to change your bot behavior to react to different circumstances. For full details you should investigate the API reference or check out Visual Studio's intellisense.<br />Viewing Your Bot In ActionYou can easily find out what your bot is up to by using the special Silverlight 2 visualizer we have created. When you open the visualizer web page in your browser, you can automatically see the status of the server running the Bot game type and get a bird's eye view of the game in progress. You can see the waypoints which are marked by green dots and the active players which have their name next to moving circles with a line indicating which way they are facing. From here you can view the game and see what your bot is doing as shown in the visualizer screenshot.<br />What To Do NextNow that you have got your bot into the game and made it move around a bit you can start thinking about making it into a decent player of the game. Take a look at the other members of the GameMap class so that your bot can look for weapons and health packs and move towards them. Then take a look at the members of the GameState class for the information that your bot is given about the game around it. <br />One thing you will need to add is some way that your bot can be in a particular state at any given time. Sensible states might be quot;
Roamingquot;
, quot;
Huntingquot;
, quot;
Idlequot;
, quot;
Recoveringquot;
, etc. Depending on the state your bot is in it will do different things each time ProcessActions is called. <br />If it is in the roaming state, for example, it will be looking for a navigation point. If it is in the hunting state it will be chasing other bots. If it is in the recovering state it will be avoiding other bots and looking for a health pack, and so on. You can keep track of the state of your bot by creating an enumerated type with the different values. Then your ProcessActions method can contain a switch statement which makes it behave differently, depending on what it is doing. <br />A state machine is just one way you could program your AI, you could make a sophisticated bot that had a way of determining if a result had a positive or negative consequence and then have the bot perform more actions that had a positive consequence. Essentially a learning bot, be careful though if your bot takes too long executing ProcessActions it will get out of touch with the game as messages will sit on the queue unprocessed waiting for your code to finish. <br />Conclusion<br />With this quick getting started guide you should be able to go about creating your own UT3 Deathmatch player. There are also some very handy hints in the FAQ below about getting your bot on the road to stardom. <br />If you’re feeling particularly brave join our project on CodePlex at http://www.codeplex.com/UT3Bots and help pitch in with improving the bot client, the visualizer, or even the server mutator.<br />Happy Fraggin'<br />Frequently Asked Questions <br />Do I need Unreal Tournament 3 to use this stuff?No, you can create bots and have them connect to any UT3 server that is running the special Bot game type and use the visualizer to get an idea of what’s going on. Of course this way isn’t as pretty as using UT3 itself! You can also run the server without owning a copy as Epic distributes a free standalone server runtime which you can get from: http://www.fileplanet.com/182580/180000/fileinfo/Unreal-Tournament-3-Windows-Dedicated-Server . <br />My bot won't move! What did I do wrong?This could be due to incorrect programming logic, please double check your code. You may also have left a Break Point within Visual Studio, if this is reached while watching your bot via Unreal Tournament 3 your bot will appear to freeze until your program continues. <br />My bot keeps getting stuck when it runs into a wall. How can I stop this?<br />Try attaching to the OnBumpedWall event and reacting to it to 'unstick' your bot. An example of how to do this would be to add the following code to your bot constructor.<br />C#<br />this.Events.OnBumpedWall += new EventHandler<BumpedEventArgs>(Events_OnBumpedWall);<br />And then add the following method to do something whenever your bot hits a wall.<br />C#<br />void Events_OnBumpedWall(object sender, BumpedEventArgs e)<br />{<br />this.Commands.RotateBy(90);<br />}<br />The code above will simply rotate the bot by ninety degrees when it hits a wall, but you can do whatever you like to make your bot better. <br />What events can my bot react to?There are a whole bunch of different events your bot can subscribe to.Remember you can always check out the API reference and also use intellisense to list all the events in the this.Events property of your bot.<br />How can I speed up the creation of event handlers for my bot?<br />There is a simple trick in Visual Studio to automatically generate the code for attaching a handler to an event.If you type the code for the name of event followed by += you can then press the TAB key twice and Visual Studio will generate the attaching and handler code for you.<br />My bot seems a little slower than the other bots! How do I make it faster?Try improving your bot’s logic to optimize the speed.The quicker the ProcessActions() method completes the more time your bot has to react in the game. <br />My Bot is nearly dead! How do I get it to collect some health? A simple idea would be to just run your bot around the level, checking the GameState.ItemsVisible list to see if your bot can see a Health item and if it can, get it to run to that location to collect it. <br />Another idea would be to use the GetNearestItem() method inside the GameMap class to find the location of the closest MediBox. Then you can call the GetPathTo() method from the Commands class to ask for an array of UTNavPoints to get to that health box. Once you have received this path, you can just get your bot to run to each point in turn until it reaches the health. <br />The following example shows you how you could do this:<br />C#<br />In your constructor:...this.Events.OnPathReceived += new EventHandler<PathEventArgs>(Events_OnPathReceived);...<br />In your class:<br />//Some variables to store our data<br />UTNavPoint[] pathToRun;<br />int index = 0;<br />protected override void ProcessActions()<br />{<br />//Check to see if we have a path to run already<br />if (this.pathToRun != null)<br />{<br />//Run to this point on the path<br />this.Commands.RunTo(this.pathToRun[index].Location);<br />//Check to see if our bot is near the point we are running to<br />if (this.SelfState.IsCloseTo(this.pathToRun[index]))<br />{<br />//Move our index to the next point in the path array<br />index++;<br />if (index >= this.pathToRun.Length)<br />{<br />//The index has reached the end of the path.<br />this.pathToRun = null;<br />}<br />}<br />else<br />{<br />//We don't have a path so find the nearest health box<br />UTObject box =this.GameMap.GetNearestItem(HealthType.MediBox);//Ask for a path to that boxthis.Commands.GetPath(quot;
Looking for healthquot;
, box.Location);<br />}<br />}<br />}<br />//Attach this method to collect the result back from GetPath()<br />void Events_OnPathReceived(object sender, PathEventArgs e)<br />{<br />if (e.Id == quot;
Looking for healthquot;
)<br />{<br />//The server has sent us a path so store it in our variable<br />this.pathToRun = e.Nodes.ToArray();<br />}<br />}<br />Some of the methods want me to provide a HealthType, AmmoType, etc as a parameter. Where can I find these?These types are Enumerators which have been used to make coding your bot easier. They are all located inside the UT3Bots.Communications namespace so to use them you need only type in the appropriate name and Intellisense should fill in the rest. <br />For example, typing WeaponType. would fill the Intellisense with the different types of weapons in UT3 so you could then pass these to the GameMap.GetNearestItem() method. <br />These types can all be sent as parameters to various methods in the Commands class: <br />AmmoType – A list of all the types of ammo for weapons in the game
ArmorType – A list of all the types of armor in the game

More Related Content

Getting Started.docx - Unreal Tournament 3 Bots for .NET

  • 1. UT3 Bots – Getting Started Guide<br />Have you ever played a first person shooter? Then you've probably played against computer controlled players known as quot; botsquot; which are computer programs designed with artificial intelligence. Up until now the only way to do create your own bot for a game like Unreal Tournament 3 was to learn a bunch of C++ and complicated AI routines. Of course, what you really want to do is code up your bot using C# or VB and Visual Studio Express. So here is a way to do just that.<br />Your First Bot<br />Once you've created a new bot you'll have a very basic class with just a constructor and an overridden ProcessActions() method.<br />using System;<br />using System.Collections.Generic;<br />using System.Linq;<br />using System.Text;<br />using UT3Bots;<br />using UT3Bots.UTItems;<br />using System.Threading;<br />using UT3Bots.Communications;<br />namespace UT3UserBot<br />{<br />public class MyBot : UTBot<br />{<br />//Constructor for your bot<br />public MyBot() : base (quot; 174.133.254.34quot; , quot; Sitting Duckquot; , BotMesh.Harbinger, BotColor.Red)<br />{<br />}<br />//Method to control the bot once it has connected to the server<br />protected override void ProcessActions()<br />{<br />//Add code here to perform some actions at specific intevals<br />}<br />}<br />}<br />Setting Up Your Bot<br />The first thing you need to do for your bot is configure it with a look and feel, and then actually connect to the server and get in the game. This is pretty straightforward, all you need to do is alter the parameters that are getting sent up to the base bot class in the constructor.<br />Server IPAddress - The first parameter is the IPAddress of the server to connect to. By default this points to the UT3Bots server we have running on the internet, you'll need to alter this to point to the server you need to connect to.
  • 2. Name – The name of your bot will be seen on the Visualizer and in game.
  • 3. Bot Mesh – This is the appearance of your bot on the server.
  • 4. Bot Color – This is the color of your bot.Now you are ready to join a UT3 game.<br />Pressing F5 will build and run your bot. The bot project will load up a little console application which provides info about what your bot is doing.<br />Bot's First SightNow that we have a bot in the game we need to make it actually do something. The first thing we are going to make it do is move to a UTNavPoint. This is a location in the game which might hold something interesting. A series of UTNavPoints provide a path through the level to interesting items. A bot can travel around a game level by moving from one UTNavPoint to another. <br />Within the game framework (UT3RemoteBot.dll), an instance of the UTVector class can be used to express the actual location of something. The location of a UTNavPoint is given by its Location property, which is given as a UTVector value. <br />Our bot needs to have a way of keeping track of where it is going so in the UT3UserBot class create a new private UTVector called destinationLocation<br />C#<br />private UTVector destinationLocation;<br />We want our bot to head towards the first navpoint that it “sees”. To do this we place the following code into the ProcessActions() method. <br />C# <br />this.destinationLocation = this.GameState.NavPointsVisible[0].Location;<br />The GameState property of our bot contains information on the current state of the game. NavPointsVisible is a list of references to UTNavPoint instances which refer to all of the UTNavPoints a bot can currently see. The above code simply takes the UTVector at position 0 (the first navigation point your bot can see) and sets destinationLocation to refer to it. <br />So at this point the bot has identified the location it wants to move towards, now we have to make it move in that direction. <br />Bot's First Steps Now we are going to make our bot move to the destination it has selected. Place the following code into the ProcessActions() method just below the code written in the previous example. <br />C#<br />this.Commands.RunTo(this.destinationLocation); <br />The Commands property provides a set of methods which are the commands that your program can give to the bot. There are a wide range of commands, some of which are listed below. For full details you should investigate the API reference. <br />Jump() - Jumps in the air
  • 5. RotateBy() - Rotates by a specific number of degrees
  • 6. RunTo() - Runs to a specific location
  • 7. StartFiring() - Attacks a target or location
  • 8. StopFiring() - Stops the bot from shooting
  • 9. StrafeTo() - Strafes to a specific location while looking at anotherThe RunTo() command is provided with a destination location. When this method is called your bot will start running towards the destination. <br />If you execute this program you will see your bot start running towards a navigation point.<br />Bot's First ShotFor the purpose of this example we will next make our bot shoot at the location it is running towards, it is recommended that you change this when creating your own implementation as shooting at an empty UTNavPoint is unlikely to get you many frags. <br />Place the following code into the ProcessActions() method just below the code written in the previous example. <br />C#<br />this.Commands.StartFiring(this.destinationLocation, false);<br />If you execute the program you will see that your bot now shoots at the location as it runs towards it. It will continue running and shooting until you call a method to instruct it to stop, or it runs out of ammo! <br />Place the following code into the ProcessActions() method just below the code written in the previous step. <br />C# <br />this.Commands.StopFiring();<br />Your bot will now stop shooting.<br />So you now know how to get your bot to do something in the game. Running around and shooting things is as easy as using the GameState property to access what your bot can see, and the Commands property to call methods that perform actions.<br />Bot's First Reaction<br />Now we are going to make the bot react to things that happen in the game. This is done by subscribing to any of the events that the bot exposes through its Events property. We normally want to subscribe to the game events as soon as the bot starts, so that we get all the juicy information that we can use to make a clever bot. You can do this by attaching an event handler to an event in the constructor for your bot.<br />In this example we will subscribe to the OnSpawned event which is trigged whenever the bot spawns in the game, whether this is the first time, or after it has died.<br />Place the following code into the constructor of the MyBot class.<br />C# <br />this.Events.OnSpawned += new EventHandler<BotSpawnedEventArgs>(Events_OnSpawned);<br />You also need to add a new method to the class that will be called when the bot spawns.<br />Place the following method code into the MyBot class.<br />C# <br />void Events_OnSpawned(object sender, BotSpawnedEventArgs e)<br />{<br />this.Commands.PerformEmote(Emote.PelvicThrust);<br />}<br />Your bot will now start performing some fetching pelvic thrusts whenever it spawns in the game. This won't actually help you get any extra frags, but maybe it'll start a new craze!<br />There are many different events you can attach handlers to which will allow you to change your bot behavior to react to different circumstances. For full details you should investigate the API reference or check out Visual Studio's intellisense.<br />Viewing Your Bot In ActionYou can easily find out what your bot is up to by using the special Silverlight 2 visualizer we have created. When you open the visualizer web page in your browser, you can automatically see the status of the server running the Bot game type and get a bird's eye view of the game in progress. You can see the waypoints which are marked by green dots and the active players which have their name next to moving circles with a line indicating which way they are facing. From here you can view the game and see what your bot is doing as shown in the visualizer screenshot.<br />What To Do NextNow that you have got your bot into the game and made it move around a bit you can start thinking about making it into a decent player of the game. Take a look at the other members of the GameMap class so that your bot can look for weapons and health packs and move towards them. Then take a look at the members of the GameState class for the information that your bot is given about the game around it. <br />One thing you will need to add is some way that your bot can be in a particular state at any given time. Sensible states might be quot; Roamingquot; , quot; Huntingquot; , quot; Idlequot; , quot; Recoveringquot; , etc. Depending on the state your bot is in it will do different things each time ProcessActions is called. <br />If it is in the roaming state, for example, it will be looking for a navigation point. If it is in the hunting state it will be chasing other bots. If it is in the recovering state it will be avoiding other bots and looking for a health pack, and so on. You can keep track of the state of your bot by creating an enumerated type with the different values. Then your ProcessActions method can contain a switch statement which makes it behave differently, depending on what it is doing. <br />A state machine is just one way you could program your AI, you could make a sophisticated bot that had a way of determining if a result had a positive or negative consequence and then have the bot perform more actions that had a positive consequence. Essentially a learning bot, be careful though if your bot takes too long executing ProcessActions it will get out of touch with the game as messages will sit on the queue unprocessed waiting for your code to finish. <br />Conclusion<br />With this quick getting started guide you should be able to go about creating your own UT3 Deathmatch player. There are also some very handy hints in the FAQ below about getting your bot on the road to stardom. <br />If you’re feeling particularly brave join our project on CodePlex at http://www.codeplex.com/UT3Bots and help pitch in with improving the bot client, the visualizer, or even the server mutator.<br />Happy Fraggin'<br />Frequently Asked Questions <br />Do I need Unreal Tournament 3 to use this stuff?No, you can create bots and have them connect to any UT3 server that is running the special Bot game type and use the visualizer to get an idea of what’s going on. Of course this way isn’t as pretty as using UT3 itself! You can also run the server without owning a copy as Epic distributes a free standalone server runtime which you can get from: http://www.fileplanet.com/182580/180000/fileinfo/Unreal-Tournament-3-Windows-Dedicated-Server . <br />My bot won't move! What did I do wrong?This could be due to incorrect programming logic, please double check your code. You may also have left a Break Point within Visual Studio, if this is reached while watching your bot via Unreal Tournament 3 your bot will appear to freeze until your program continues. <br />My bot keeps getting stuck when it runs into a wall. How can I stop this?<br />Try attaching to the OnBumpedWall event and reacting to it to 'unstick' your bot. An example of how to do this would be to add the following code to your bot constructor.<br />C#<br />this.Events.OnBumpedWall += new EventHandler<BumpedEventArgs>(Events_OnBumpedWall);<br />And then add the following method to do something whenever your bot hits a wall.<br />C#<br />void Events_OnBumpedWall(object sender, BumpedEventArgs e)<br />{<br />this.Commands.RotateBy(90);<br />}<br />The code above will simply rotate the bot by ninety degrees when it hits a wall, but you can do whatever you like to make your bot better. <br />What events can my bot react to?There are a whole bunch of different events your bot can subscribe to.Remember you can always check out the API reference and also use intellisense to list all the events in the this.Events property of your bot.<br />How can I speed up the creation of event handlers for my bot?<br />There is a simple trick in Visual Studio to automatically generate the code for attaching a handler to an event.If you type the code for the name of event followed by += you can then press the TAB key twice and Visual Studio will generate the attaching and handler code for you.<br />My bot seems a little slower than the other bots! How do I make it faster?Try improving your bot’s logic to optimize the speed.The quicker the ProcessActions() method completes the more time your bot has to react in the game. <br />My Bot is nearly dead! How do I get it to collect some health? A simple idea would be to just run your bot around the level, checking the GameState.ItemsVisible list to see if your bot can see a Health item and if it can, get it to run to that location to collect it. <br />Another idea would be to use the GetNearestItem() method inside the GameMap class to find the location of the closest MediBox. Then you can call the GetPathTo() method from the Commands class to ask for an array of UTNavPoints to get to that health box. Once you have received this path, you can just get your bot to run to each point in turn until it reaches the health. <br />The following example shows you how you could do this:<br />C#<br />In your constructor:...this.Events.OnPathReceived += new EventHandler<PathEventArgs>(Events_OnPathReceived);...<br />In your class:<br />//Some variables to store our data<br />UTNavPoint[] pathToRun;<br />int index = 0;<br />protected override void ProcessActions()<br />{<br />//Check to see if we have a path to run already<br />if (this.pathToRun != null)<br />{<br />//Run to this point on the path<br />this.Commands.RunTo(this.pathToRun[index].Location);<br />//Check to see if our bot is near the point we are running to<br />if (this.SelfState.IsCloseTo(this.pathToRun[index]))<br />{<br />//Move our index to the next point in the path array<br />index++;<br />if (index >= this.pathToRun.Length)<br />{<br />//The index has reached the end of the path.<br />this.pathToRun = null;<br />}<br />}<br />else<br />{<br />//We don't have a path so find the nearest health box<br />UTObject box =this.GameMap.GetNearestItem(HealthType.MediBox);//Ask for a path to that boxthis.Commands.GetPath(quot; Looking for healthquot; , box.Location);<br />}<br />}<br />}<br />//Attach this method to collect the result back from GetPath()<br />void Events_OnPathReceived(object sender, PathEventArgs e)<br />{<br />if (e.Id == quot; Looking for healthquot; )<br />{<br />//The server has sent us a path so store it in our variable<br />this.pathToRun = e.Nodes.ToArray();<br />}<br />}<br />Some of the methods want me to provide a HealthType, AmmoType, etc as a parameter. Where can I find these?These types are Enumerators which have been used to make coding your bot easier. They are all located inside the UT3Bots.Communications namespace so to use them you need only type in the appropriate name and Intellisense should fill in the rest. <br />For example, typing WeaponType. would fill the Intellisense with the different types of weapons in UT3 so you could then pass these to the GameMap.GetNearestItem() method. <br />These types can all be sent as parameters to various methods in the Commands class: <br />AmmoType – A list of all the types of ammo for weapons in the game
  • 10. ArmorType – A list of all the types of armor in the game
  • 11. HealthType – A list of the different types of health items in the game
  • 12. WeaponType – A list of the different types of weapon in the game  <br />The following types can be sent as parameters to your bot’s base constructor:<br />BotColor – A list of the 5 different colours to use when configuring your bot
  • 13. BotMesh – A list of the skins that you can give your bot when configuring it There is also the Emote enumeration which is used when calling the PerformEmote command.<br />How do I shoot at another player? <br />All you need do is check the.PlayersVisible list for any players that your bot can currently see. You would then call the Commands.StartFiring() passing in one of the Bots from the list and a bool which if set to true your bot will use the secondary fire mode on the current weapon if set to false your bot will use the primary fire mode. <br />Which version of Unreal Tournament 3 do I need if I want to see in game action?<br />Although you don't require a copy of UT3 to program a bot, if you want to get the best experience possible you should own the game so that you can see your bot in all its High Resolution 3D goodness.The minimum required version for running the server UT3 BotDeathmatch game type is UT3 v1.2 because Epic introduced some unreal script classes in that patch that make the whole thing possible. <br />Where can I get my hands on the source code?<br />The UT3 Bots project is available on CodePlex at http://www.codeplex.com/UT3Bots there you can download or browse all the code that is used in the project.There are also specific instructions for building the UT3 Server code in the readme.txt file should you feel adventurous enough to make some changes to it.<br />