Game Development Community

AIPlayer

by Demolishun · in Torque Game Engine · 11/04/2005 (7:24 pm) · 8 replies

Is there a tutorial somewhere that shows how to properly setup a bot that will do more than follow a stupid path?

I have been trying to get some bots to control a turret and the only thing I have gotten to kind of work is settting the bot to aim at point 0 0 0. However when I did that it kept moving spinning very fast and never aimed at anything.

I cannot seem to get any of the AIPlayer callbacks to do anything as well.
These never trigger:
function PlayerData::onTargetEnterLOS(%this,%obj)
{
   echo("DemoPlayer::onTargetEnterLOS");
   //%this.setAimObject(%obj);
}

function PlayerData::onTargetExitLOS(%this,%obj)
{
   echo("DemoPlayer::onTargetExitLOS");
   //%this.setAimObject(0);
}

Thanks,
Frank

About the author

I love programming, I love programming things that go click, whirr, boom. For organized T3D Links visit: http://demolishun.com/?page_id=67


#3
11/21/2005 (3:51 am)
There is a complete section on AI in Ken Finney's book "Advanced 3D Game Programming All In One". You can find this book, and the first one (3D Game Programming All In One) on Amazon.com
#4
11/21/2005 (4:21 am)
The AIGuard resource is a great way to learn about better AI.
#5
12/05/2005 (7:54 pm)
Dang it. I only have 3D Game Programming All In One. I guess I may have to ask Santa for the new one. : )

I will check out AIGuard as well.

Thanks,
Frank
#6
01/07/2006 (10:09 am)
The bots.txt was very helpful to me for getting some things right in my mind...
still not sure how to implement in code instead of the console.. and is it because the NPC uses datablock="PlayerBody" that it gets the same mesh... how can I set up a brand new file.cs with NEW meshes and art so that when I create NPC's I can use different bodies?
#7
01/07/2006 (10:34 am)
Check this and this thread.
#8
01/20/2006 (4:37 am)
AIGuard is an incredible resource. Great learning experience and result is a pretty awesome base for an AI.