Game Development Community

Friendly Ai Player help

by Michael Roberts 13 · in Torque 3D Beginner · 01/19/2015 (4:16 pm) · 4 replies

Hey everyone Michael here with another AI help request.So everyone already knows about enemy AI chasing guarding and such,well all i need is for my ally AI to do the same(with the exception of killing me).I wanted a type of team AI.Where the AI try to kill everyone on the opposing team.and ally AI kill their enemies and protect you need some help.
Thanks in advance,
Michael

About the author

13 year old teen,n00b scriptor but skillful in 3d artists.Gamer 4 life


#1
01/19/2015 (4:30 pm)
Start by assigning all objects a team value.

Then, use a container radius search to pull all objects within the friendly bot's range, then over each of the objects check to see if the team number matches or not. You can apply further tests as necessary.

As for further instructions, that will require an additional framework layer over the AI object, something on par with a "think" method where the AI will need to determine the necessary course of action, and execute it.

Since you are relatively new to the whole scripting of the engine (by the looks of existing topics), might I recommend you give a read of the first seven chapters of my ultimate guide (which are free) just to get your feet wet with some basic scripting stuff.

If that seems a bit too basic, I have a massive repository of TS code including functions & weapons from an old Tribes 2 project of mine that you're more than welcome to look over. Do keep in mind that some of the syntax and functioning will be different.
#2
01/19/2015 (6:12 pm)
is there any way you can dumb that down so i can understand you a little easier
#3
03/08/2015 (10:47 am)
Robert thanks for the guide. I have been away from using T3D for several years now and this is a great resource! I am glad Michael asked about it!
Cheers,
Joe
#4
03/08/2015 (12:20 pm)
Reading the guide now Robert, thank you. Also I love the totalwar github! Were you one of those responsible for that mod?