AI Guard Unit
by Mark Holcomb · 11/27/2004 (5:18 pm) · 335 comments
Download Code File
This is my second attempt at making an AI controlled character. The first was an
AIPlayer that would follow paths. This character is a guard unit. The guard will
wait at it's post (spawn point) until it sees a target. It will then attack that
target while trying to close with it.
If the target is lost the bot will wait at the last place it saw the character and
look around for a little bit, and then it will try to return to it's post.
There is a chance the bot will get stuck trying to return, but there is a simple
routine that has the bot try to move in random directions to try and clear itself
of any obstacles between it and it's post. It's not perfect.
The thinking routine is a simple state machine - which can be expanded on to give the bot more responses and actions.
As with my first ai character, I am using a simple system that allows the designer to drop
markers in the game map that will mark where the bots will start out. When the mission is loaded, the markers are detected and bots are spawned at the marker locations. The markers are then hidden from view. (The markers can be left visible to help in map editing.)
The markers for the guards can be given a dynamic variable called respawn. (Assigned to the marker during map editing.) 'Respawn' will determine whether a bot respawns or not upon death.
The bots have an attention setting. How often they scan is determined by their attention level. The bots get more sluggish (freeing up processor time) when targets are too far away. Conversely, the bot becomes incrementally more attentive as targets come within range, and further aware as targets come into sight.
When a target is found in range and in sight the bot will shoot at the target. The firing sequence is a step of scheduled calls that call for a firing cycle, a trigger down cycle, and a firing delay to control bot rate of fire.
When a bot is attacked it will attempt to sideatep and it's field of vision is temporarily increased to a 360deg field of vision - to emulate looking around to see what happened. The bot's attention level is also set to make it think at it's fastest rate when attacked.
To use the AIGuard...the following changes need to be made.
1. Back up your original game.cs, player.cs, and your current build of Torque. To install AIGuard will require a recompile, since I have created a new class cloned by copying AIPlayer.cc and AIPlayer.h and renaming all references to AIPlayer to AIGuard.
(I did this because I wanted to be able to run both my AIPatroller and AIGuards in the same maps and did not want to have any confusion between them.)
2. Add the files AIGuard.cc and AIGuard.h to your Torque project. (In my instance I saved them to my c:\Torque\engine\game directory and then added them into my project.)
3. Recompile your project and copy your new executable to the appropriate directory for your app.
4. Copy the file AIGuard.cs into your server/scripts directory.
5. Modify game.cs to add the line
to the function onServerCreated().
6. Also in game.cs: The section for function StartGame needs to modified the following ways:
Below the lines that read:
add this:
(If you followed my previous resource you may not have any reference to AImanager. Don't fret... just look for the place in game.cs where you have
and put in
right underneath it.
7. In player.cs in the code for Armor::Damage modify the lines
to read:
*** If you followed my previous resource there should be no need to change this code.
8. Load your map - Stronghold as an example.
9. Go into the map editor. (F11) Then go into the Editor Creator (F4)
10. Under Shapes there should be a drop down called AIMarker, under that a new item called AIGuard.
11. Create a new AIGuard marker.
12. Select your marker, position it where you like and hit (F3) to modify the marker.
13. If you want to override the default respawn value - create a dynamic variable called respawn and set it's value to true or false.
14. Update your item by clicking 'APPLY'- very important and easy to miss step.
15. Save your mission and reload it.
A bot called Guard1 should appear at the spot of your marker.
If you come within range of the guard he should shoot at you and try to hunt you down.
If you get away, or when you die, he should return to his post.
I hope the resource helps other people get up and running with some AI code in their game.
And again, I'd like to thank the other members of this website whose code has been used in several places in the scripting to make this all work.
Mark H.
P.S. I've also included my AIPatrol class files with this - to install it follow the same instructions as for AIGuard, just substitute AIPatrol where AIGuard appears in the instructions. They can both be run at the same times with no problems.
P.S.S. 11/28/04 - I modified the AIPatrol.cs file to correct for a couple of typos.
P.S.S.S 12/3/04 - Added ammo and health seeking capabilities and fixed some errors. (Read posts below - or file in .zip for full details.)
This is my second attempt at making an AI controlled character. The first was an
AIPlayer that would follow paths. This character is a guard unit. The guard will
wait at it's post (spawn point) until it sees a target. It will then attack that
target while trying to close with it.
If the target is lost the bot will wait at the last place it saw the character and
look around for a little bit, and then it will try to return to it's post.
There is a chance the bot will get stuck trying to return, but there is a simple
routine that has the bot try to move in random directions to try and clear itself
of any obstacles between it and it's post. It's not perfect.
The thinking routine is a simple state machine - which can be expanded on to give the bot more responses and actions.
As with my first ai character, I am using a simple system that allows the designer to drop
markers in the game map that will mark where the bots will start out. When the mission is loaded, the markers are detected and bots are spawned at the marker locations. The markers are then hidden from view. (The markers can be left visible to help in map editing.)
The markers for the guards can be given a dynamic variable called respawn. (Assigned to the marker during map editing.) 'Respawn' will determine whether a bot respawns or not upon death.
The bots have an attention setting. How often they scan is determined by their attention level. The bots get more sluggish (freeing up processor time) when targets are too far away. Conversely, the bot becomes incrementally more attentive as targets come within range, and further aware as targets come into sight.
When a target is found in range and in sight the bot will shoot at the target. The firing sequence is a step of scheduled calls that call for a firing cycle, a trigger down cycle, and a firing delay to control bot rate of fire.
When a bot is attacked it will attempt to sideatep and it's field of vision is temporarily increased to a 360deg field of vision - to emulate looking around to see what happened. The bot's attention level is also set to make it think at it's fastest rate when attacked.
To use the AIGuard...the following changes need to be made.
1. Back up your original game.cs, player.cs, and your current build of Torque. To install AIGuard will require a recompile, since I have created a new class cloned by copying AIPlayer.cc and AIPlayer.h and renaming all references to AIPlayer to AIGuard.
(I did this because I wanted to be able to run both my AIPatroller and AIGuards in the same maps and did not want to have any confusion between them.)
2. Add the files AIGuard.cc and AIGuard.h to your Torque project. (In my instance I saved them to my c:\Torque\engine\game directory and then added them into my project.)
3. Recompile your project and copy your new executable to the appropriate directory for your app.
4. Copy the file AIGuard.cs into your server/scripts directory.
5. Modify game.cs to add the line
exec("./aiGuard.cs"); to the function onServerCreated().
6. Also in game.cs: The section for function StartGame needs to modified the following ways:
Below the lines that read:
// Start the AIManager
new ScriptObject(AIManager) {};
MissionCleanup.add(AIManager);
AIManager.think();add this:
AIGuard::LoadEntities();
(If you followed my previous resource you may not have any reference to AImanager. Don't fret... just look for the place in game.cs where you have
AIPlayer::LoadEntities
and put in
AIGuard::LoadEntities();
right underneath it.
7. In player.cs in the code for Armor::Damage modify the lines
// Deal with client callbacks here because we don't have this
// information in the onDamage or onDisable methods
%client = %obj.client;
%sourceClient = %sourceObject ? %sourceObject.client : 0;
if (%obj.getState() $= "Dead")
%client.onDeath(%sourceObject, %sourceClient, %damageType, %location);to read:
// Deal with client callbacks here because we don't have this
// information in the onDamage or onDisable methods
%client = %obj.client;
%sourceClient = %sourceObject ? %sourceObject.client : 0; if (%obj.isbot == true)
{
%obj.attentionlevel=1;
%obj.enhancefov(%obj);
}
if (%obj.getState() $= "Dead")
{
if (%obj.isbot == true)
{
if (%obj.respawn == true)
{
%obj.delaybeforerespawn(%obj.botname, %obj.markerpos, %obj.marker);
%this.player=0;
}
}
else
{
%client.onDeath(%sourceObject, %sourceClient, %damageType, %location);
}
}*** If you followed my previous resource there should be no need to change this code.
8. Load your map - Stronghold as an example.
9. Go into the map editor. (F11) Then go into the Editor Creator (F4)
10. Under Shapes there should be a drop down called AIMarker, under that a new item called AIGuard.
11. Create a new AIGuard marker.
12. Select your marker, position it where you like and hit (F3) to modify the marker.
13. If you want to override the default respawn value - create a dynamic variable called respawn and set it's value to true or false.
14. Update your item by clicking 'APPLY'- very important and easy to miss step.
15. Save your mission and reload it.
A bot called Guard1 should appear at the spot of your marker.
If you come within range of the guard he should shoot at you and try to hunt you down.
If you get away, or when you die, he should return to his post.
I hope the resource helps other people get up and running with some AI code in their game.
And again, I'd like to thank the other members of this website whose code has been used in several places in the scripting to make this all work.
Mark H.
P.S. I've also included my AIPatrol class files with this - to install it follow the same instructions as for AIGuard, just substitute AIPatrol where AIGuard appears in the instructions. They can both be run at the same times with no problems.
P.S.S. 11/28/04 - I modified the AIPatrol.cs file to correct for a couple of typos.
P.S.S.S 12/3/04 - Added ammo and health seeking capabilities and fixed some errors. (Read posts below - or file in .zip for full details.)
#102
The AIGuard simply vanishes, no trace, no guard.
Any ideas? Yes I made sure to click apply :)
04/23/2005 (3:43 pm)
I just tried to add this - all went fine, except that for some reason when I try to add the player, save, and reload, he no longer exists.The AIGuard simply vanishes, no trace, no guard.
Any ideas? Yes I made sure to click apply :)
#103
I was wondering, if it is possible to create two teams lets say Team1 and Team2. and add 3 AiGuard to each team. The AiGuard of Team1 will follow the player and if required, they will fight for the player against enimies(team2).
I hav digged into CTFBot Resource, added myself in RedTeam but instead of defending the RedFlag, i want them to follow me and fight with BlueTeam.
If somebody could point me to the right direction. Thanx in advance.
Ali Shikla
04/25/2005 (3:23 am)
Hi, I have no problem with this, and its working perfect for me.I was wondering, if it is possible to create two teams lets say Team1 and Team2. and add 3 AiGuard to each team. The AiGuard of Team1 will follow the player and if required, they will fight for the player against enimies(team2).
I hav digged into CTFBot Resource, added myself in RedTeam but instead of defending the RedFlag, i want them to follow me and fight with BlueTeam.
If somebody could point me to the right direction. Thanx in advance.
Ali Shikla
#104
Turn on your 15yr old p0wn3r translater (I've been playing MMORPGs alot latey):
OMGOMGOMG!!!11!!
they just pwnd me and took my flame thrower!!@$
WTH?? THE DEVS TURNED ON FRIENDLY FIRE?!@#
GO BACK!!!
THEY GANKED THE NANOSTIMS, THEY ARE GONE!!
THEY ALL HAVE FULL HEALTH!!
GO BACK!!!
lame, every1's dead.
This game sux!
Meet U outside the Trauma Ward after respawn.
Let's throw grenades off of the roof next time.
Those mobs can't be that smart...can they?
Ok, you can turn the translator off now.
I'm really a 28 year old designer/admin of a wireless ISP.
I just want to say thank you and a couple of notes.
I read this article first and then went back to use your original project.
After getting that one working I tried this one.
The double respawning and a few other issues arose, but the were all solved here by posts.
I spent 3 days tracking down a hard crash that was actually my code where bots drop their weapons on the ground (2 lines of code, go figure).
Anyways, in fixing this bug I back tracked and used this article only.
The AI works amazing!
For anybody having trouble I'm using VS6(there were NO compile issues) and had to go back and make sure I followed the instructions letter for letter and then go through the posts.
I'm interested in getting the bots to switch from patrol mode to guard style ai and then back again if the guard starts "returning".
I'll post if I have any luck with that.
Also, Rob Davidson and myself completed a persitent character/loot/mob server and the very simple idea of .isbot was the final touch so that my bots could be loaded from a sql dbase differently than players.
We do our loading/saving on armor::disable armor:onadd.
Having the AI use multiple weapons is another task I'm working on before I sleep.
I have used nearly every AI tutorial and each has their benefits and features, but this is bar none the place to start for AI in Torque.
Mark, a personal note, you might want to add to and bundle what you have into a clean add-on package and sell it on GG.
It's not for the money, I'm not in it for the money either.
If you were able to provide the GG users a cheap instant AI bundle, it would be a great service.
Honestly the work here is enough but I'd (got an account?) paypal ya $10-$20 as a thank you.
Ari Rule (The only dev left on yet another MMOFPSRPG project.)
P.s. Ruin Online is in Beta and being tested by a bunch of players. I'm a one man dev monster now and BrokeAss Games is still here. Sorry for the shameless plug, but this seemed like a really good place to try and recruit devs. :)
http://www.brokeass.instawave.com <- Looking for tester/webmaster.
04/25/2005 (7:39 am)
This resource is wonderful, let me explain my first night of testing after the code was in and working...Turn on your 15yr old p0wn3r translater (I've been playing MMORPGs alot latey):
OMGOMGOMG!!!11!!
they just pwnd me and took my flame thrower!!@$
WTH?? THE DEVS TURNED ON FRIENDLY FIRE?!@#
GO BACK!!!
THEY GANKED THE NANOSTIMS, THEY ARE GONE!!
THEY ALL HAVE FULL HEALTH!!
GO BACK!!!
lame, every1's dead.
This game sux!
Meet U outside the Trauma Ward after respawn.
Let's throw grenades off of the roof next time.
Those mobs can't be that smart...can they?
Ok, you can turn the translator off now.
I'm really a 28 year old designer/admin of a wireless ISP.
I just want to say thank you and a couple of notes.
I read this article first and then went back to use your original project.
After getting that one working I tried this one.
The double respawning and a few other issues arose, but the were all solved here by posts.
I spent 3 days tracking down a hard crash that was actually my code where bots drop their weapons on the ground (2 lines of code, go figure).
Anyways, in fixing this bug I back tracked and used this article only.
The AI works amazing!
For anybody having trouble I'm using VS6(there were NO compile issues) and had to go back and make sure I followed the instructions letter for letter and then go through the posts.
I'm interested in getting the bots to switch from patrol mode to guard style ai and then back again if the guard starts "returning".
I'll post if I have any luck with that.
Also, Rob Davidson and myself completed a persitent character/loot/mob server and the very simple idea of .isbot was the final touch so that my bots could be loaded from a sql dbase differently than players.
We do our loading/saving on armor::disable armor:onadd.
Having the AI use multiple weapons is another task I'm working on before I sleep.
I have used nearly every AI tutorial and each has their benefits and features, but this is bar none the place to start for AI in Torque.
Mark, a personal note, you might want to add to and bundle what you have into a clean add-on package and sell it on GG.
It's not for the money, I'm not in it for the money either.
If you were able to provide the GG users a cheap instant AI bundle, it would be a great service.
Honestly the work here is enough but I'd (got an account?) paypal ya $10-$20 as a thank you.
Ari Rule (The only dev left on yet another MMOFPSRPG project.)
P.s. Ruin Online is in Beta and being tested by a bunch of players. I'm a one man dev monster now and BrokeAss Games is still here. Sorry for the shameless plug, but this seemed like a really good place to try and recruit devs. :)
http://www.brokeass.instawave.com <- Looking for tester/webmaster.
#105
...last observation: they always point the same way, towards the Y axis. And it would be super neat to have the dynamic variables I see when a bot spawns to be passed from the marker...! That would make customizing the placement and use of each marker a lot easier for the designers...just a thought.
Thanks, Mark!
04/25/2005 (7:58 am)
Great Resource, I didn't add this to the Source Code at all[no proper tools/experience to compile], simply used the script[as aiPlayer.cs] and it works fine. I especially like the bots ability to 'retrieve' the items, and the console feedback/hud readout. I find that they look quite well for the health items, but sadly; I can't seem to get them interested in looking for ammo. I've gotten to where they know they're out of ammo, they should activate the enhancedFOV, but then they continue to 'glue' to me, ignoring the lure of additional ordinance to finish me off. I jizzled with the evaluation of the ammo amount to be no just equal to zero, but at <= to a less than full spawning ammount. They react to the lowered comparrison, but somewhere their getammo is not strong enough to overcome the state of aggression/findTarget, etc...still the BEST ai Resource 'out of box' I've come accross. The GameBeaver example is good for having the bot's names and score increment and show on the ScroeBoard[for MP], but when I implemented it into my engine[via script hacking], they didn't seem intrested in chasing me, they kept to their constrained paths, which is why I like this approach. I'd like to get the choice of bots coming from an index like gameBeavers, that gave me 3 separate looking bots with unique names and added them to the ScoreBoard somehow. I'm still looking for the right bridge between the examples, I'm sure this is doable, the datablock called for in the spawning method is coming from the BotIndex created...probably adding a lot of .isbots in appropriate places. ...last observation: they always point the same way, towards the Y axis. And it would be super neat to have the dynamic variables I see when a bot spawns to be passed from the marker...! That would make customizing the placement and use of each marker a lot easier for the designers...just a thought.
Thanks, Mark!
#106
Check to see if the ammo your looking for has a collision mesh. I ran into the same problem when trying to make my bots work. When the bots "look" for an object they cast a ray to the object to test for collision with the object - this is done as part of the visibility check. Without a collision mesh, the ray passes through the object and they are never seen.
And since they are never seen the bot thinks there are no valid ammo targets, and does something else rather than retrieve ammo.
That's where I'd look first anyway, if that doesn't help - post back.
Mark H.
04/25/2005 (6:37 pm)
A quick comment about your ammo problem.Check to see if the ammo your looking for has a collision mesh. I ran into the same problem when trying to make my bots work. When the bots "look" for an object they cast a ray to the object to test for collision with the object - this is done as part of the visibility check. Without a collision mesh, the ray passes through the object and they are never seen.
And since they are never seen the bot thinks there are no valid ammo targets, and does something else rather than retrieve ammo.
That's where I'd look first anyway, if that doesn't help - post back.
Mark H.
#107
Problem solved! NewSDKammo is my attempt at getting the crossbowAmmo file to stop creating the red Error's in the console concerning it's collision mesh. I had opened it in Max to take a look and noticed clearly the mesh object exceeding the bounds object by just enough to cause havoc with the engine's error checks. I hope I succeeded. it has 3 detail levels, which might be a little less 'popping' when viewed ingame.
04/26/2005 (10:13 pm)
Hmmm....Thanks, I guess I didn't...must have been goofy, as I'd specificlly wanted to correct the perpetual Errors popping with the SDK version...I have my 3 LOD's which is where I got all antsy to get it inside the engine...thanks again...yep...I hacked in a known shape to contain a collision mesh, and it looks like perhaps with mulitple meshes for lods' in Milkshape/exporter...my collision mesh is being ignored..odd cause the dump file and showToolPRO shows a shape in the tree but not visible...hmmm.....Problem solved! NewSDKammo is my attempt at getting the crossbowAmmo file to stop creating the red Error's in the console concerning it's collision mesh. I had opened it in Max to take a look and noticed clearly the mesh object exceeding the bounds object by just enough to cause havoc with the engine's error checks. I hope I succeeded. it has 3 detail levels, which might be a little less 'popping' when viewed ingame.
#108
starter.fps/server/scripts/aiGuard.cs (697): Unable to find object: '' attempting to call function 'getPosition'
starter.fps/server/scripts/aiGuard.cs (704): Unable to find object: '' attempting to call function 'getPosition'
starter.fps/server/scripts/aiGuard.cs (114): Unable to find object: '' attempting to call function 'getPosition'
any ideas? thanks in advance,
-steve
05/30/2005 (8:31 pm)
hi everyone, well I've got this code functioning pretty well but i am still having one problem, it seems that after i kill the guard i'm getting this error loop that i can't figure out,starter.fps/server/scripts/aiGuard.cs (697): Unable to find object: '' attempting to call function 'getPosition'
starter.fps/server/scripts/aiGuard.cs (704): Unable to find object: '' attempting to call function 'getPosition'
starter.fps/server/scripts/aiGuard.cs (114): Unable to find object: '' attempting to call function 'getPosition'
any ideas? thanks in advance,
-steve
#109
-steve
05/31/2005 (9:35 pm)
dug back through the older posts and double checked everyone elses fix, with a combo of the 3 i've finally got her running smooth, thanks again for the great resource,-steve
#110
06/08/2005 (8:58 pm)
hmm I am wondering if it is possible to make a helper or ally AI guard that can help you out by attacking the enemy AIGuards. Is this something that can be changed simply by script or is it something that requires some hard coding in C++. I looked through the AIGuard.cs file and thought that it could be fixed with a simple change to the GetClosestHumanInSightandRange() function. Maybe instead of looking for the player object it looks for the bot object and...well...they kill eachother. Unfortunatly I wasnt able to find what the bot objects were refered to in the .cs file and when I canged it the bots didnt attack anything (this was an expected result). More or less what I am wondering is if it is possible or will it take great knowledge in AI programming and FSM (finite state machines). I am looking to have many different "factions of prople fighting eachother, i.e. I'm fighting the bad guys and so are my helper AIguards and the bad guys are fighting me and the helper AIguards. Otherwise this is the best AI resource available right now. The bots seem inteligent and everything works great. I love the item retreiving addition. This has to be one of my favorite (and most enjoyable) resources yet. THANKS!!
#111
Check out function AIGuard::GetClosestHumanInSightandRange.
I'm not sure if these bots are clients because I'm working on other code.
But it might not work out, maybe it will.
I used other AI code from this site and had them attack whatever hurt me in the player::onDamage.
06/11/2005 (7:45 am)
@RobertCheck out function AIGuard::GetClosestHumanInSightandRange.
I'm not sure if these bots are clients because I'm working on other code.
But it might not work out, maybe it will.
I used other AI code from this site and had them attack whatever hurt me in the player::onDamage.
#112
I'm currently trying to get the bot to spawn with a name I set in the mission file. When I add the aiMarker, is there a variable I can set on the marker to define the name? Rather than having "Guard1", "Guard2", etc.?
06/16/2005 (2:24 pm)
Great resource Mark!I'm currently trying to get the bot to spawn with a name I set in the mission file. When I add the aiMarker, is there a variable I can set on the marker to define the name? Rather than having "Guard1", "Guard2", etc.?
#113
You can set the name of the units using.setShapeName( %name );
In the AIGuard code the name is set in LoadEntities by calling spawnAtMarker with the name it will call the unit.
06/17/2005 (9:01 am)
@RodneyYou can set the name of the units using
In the AIGuard code the name is set in LoadEntities by calling spawnAtMarker with the name it will call the unit.
#114
06/17/2005 (4:09 pm)
Ok, I found what I was looking for. I just made a dynamic field on the AIGuardMarker and then used that name in the bot creation. Thanks :)
#115
06/19/2005 (8:16 am)
What dynamic field did you create to get the names working?? I tried various combinations and nothing seems to get me beyond the 'Guard'*. I see in::spawn, a reference to %player.setShapeNameand
::spawnAtMarker("Guard" @ %i, %targetobject). Is it somewhere within these functions[replace"Guard" with something else?, a console command??], that I need to find the solution? I've also been struggling with getting these bots to appear on the scoreboard and register kills. I've seen AiClient and AiConnection in the Source code but I can't figure out how to get anything other than the Client player to appear, then again; I am primarily an artist and it gets confusing jumping around functions/methods-Classes/nameSpaces to track down the 'flow' of commands and where/how they overwrite each other. Like in player, why some functions work with nameSpace and others work from Class, aaaarrrrghhh....:).
#116
Then in AIGuard.cs, I changed this:
06/20/2005 (2:28 am)
In the mission file, I have:new StaticShape() {
position = "366.578 415.754 242.646";
rotation = "1 0 0 0";
scale = "1 1 1";
dataBlock = "AIGuardMarker";
rpgname="A Skeletal Fiend";
};Then in AIGuard.cs, I changed this:
while ((%targetObject = containerSearchNext()) != 0)
{
if(%targetobject.getclassname() $= "StaticShape")
{
if (%targetobject.getDataBlock().getName() $= "AIGuardMarker")
{
%i++;
%player = AIGuard::spawnAtMarker("Guard" @ %i, %targetobject);
}
}
}to this:while ((%targetObject = containerSearchNext()) != 0)
{
if(%targetobject.getclassname() $= "StaticShape")
{
if (%targetobject.getDataBlock().getName() $= "AIGuardMarker")
{
%player = AIGuard::spawnAtMarker(%targetobject.rpgname, %targetobject);
}
}
}
#117
...worked great.!
I'm just curious though about an assignment I noticed;
06/20/2005 (6:16 am)
Thanks, Rodney. I'll give this a try this evening and see what happens, :) I see what I did differently....worked great.!
I'm just curious though about an assignment I noticed;
botname = %namein
::spawn, and
::respawn, and it seemed to be used with
%obj.delaybeforerespawn(%obj.[b]botname[/b], %obj.marker);. I tried to keep consistent by naming my dynamic variable botname also. I am just wondering what is does...I guess force the HUD on respawn to print the name?? Thanks again. All I need now is how to get them in a MissionGroup so they'll be truely a participant in the Deathmatches....would be a perfect addition to this series!
#118
06/28/2005 (12:06 am)
Dang...can't get it to work...nothing appears when I reload the mission. Yes, I did click Apply. Could someone help me? I even did the ammo thing...nothings working...
#119
I also noticed in the debug window it is constantly printing cant find function mRadtoDeg.
What can I do to fix this? Thanks
Edit: When I shoot at them the bullets go right through (im using the crossbow here), they never take any damage.
08/14/2005 (5:12 pm)
I have 5 of the Guard bots in my mission. All they do is run around and look confused, they never shoot at me.I also noticed in the debug window it is constantly printing cant find function mRadtoDeg.
What can I do to fix this? Thanks
Edit: When I shoot at them the bullets go right through (im using the crossbow here), they never take any damage.
#120
I don't like editing the source code,and would rather have this replace your other AI.
I'm not sure how hard it would be.(I'm a newbie coder) but if you could convert this to work as "aiplayer" it would be appreciated!
08/18/2005 (8:15 pm)
Could you possibly make this work as "aiplayer.cs" instead of guard?I don't like editing the source code,and would rather have this replace your other AI.
I'm not sure how hard it would be.(I'm a newbie coder) but if you could convert this to work as "aiplayer" it would be appreciated!

Torque Owner Tim Hutcheson