Game Development Community

AI Guard Teams

by Skylar Kelty · in Torque Game Engine · 05/31/2006 (4:24 am) · 9 replies

Hello,
I've been trying for the last 5 hours to get teams working in the AI Guard resource.
I've been using this resource for teams:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2312
I can get it so if im on team 1 they wont shoot, they will defend me and if im on team 2 they will kill me
But I cant get them to join a team

The code im using is at the address below (due to word limit):
www.sphyxgames.com/aiguard.cs

How can I get the AI to join teams?


Thanks in advance

#1
06/02/2006 (4:35 am)
Still need help
#2
06/03/2006 (2:28 am)
*bump*
#3
06/04/2006 (12:10 am)
I have just started truing to do the same thing with little success.
Have you made any progress on this problem?

I will let you know if I find a solution, still cant even get a bot to join a team :(
#4
06/04/2006 (6:25 am)
No I can only get them to fire at human players on certain teams.
I might take a look at the getclosesthumanandrange function and modify it to fire at bots too, then only at bots with a %team1 or %team2 variable.
#5
06/08/2006 (7:00 pm)
If you look through the modified code for the CTFBot in the resource linked below you'll see what I did to get the bots to detect both human and non-human players.

There's a lot of other changes in there that don't pertain to just the team aspect. But the bots will shoot at both human and non-human players.

It is kind of weird because the game engine treats them differently for each case so you have to check for both types of targets then cull which one is the more optimum based on your criteria, I believe my code uses distance.

It's been forever since I've looked through the code for this stuff, but hopefully this will help point you in the right direction. If not post back and I'll try to be more specific.

The link is: www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=6889
#6
06/09/2006 (10:40 am)
Thanks Mark, I had made some progress but nothing that worked, ill take a look at the resource over the weekend
#7
07/30/2006 (12:46 pm)
James, hows progress?
#8
07/31/2006 (12:06 am)
Very slow, other things have taken priority right now.
It will come
#9
08/03/2006 (4:38 pm)
Awesome, I took a look at the Killer Kork resource, where the there's two teams of bots that battle it out, but only the 'leader' of each ai team will attack you, I also implimented the team resource, and in that I can't get the bots on teams.. I havnt dug too deeply into the killerkork resource where they fight but I'd like to get this to work so that the bots recognize what team players are on and act accordingly