Best method to create ally ai in game?

Best method to create ally ai in game?

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

Best method to create ally ai in game?

Post by bobthedinosaur »

Say I start a game with 2 human players only 1 on each side. I would like there to be 1 ally ai team added to each side as well but with out the hassle of setting it up in the pregame. I think I've seen a few games pull this off, but I don't know how the best way to do it is. Any suggestions? Does this make any sense even?
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Best method to create ally ai in game?

Post by gajop »

I assume you want a new AI team to be created which would be assigned the same allyTeam as one of the player teams?
I don't think this is trivial, afaik there are still some API functions missing in order to achieve this.
Maybe the easiest way would be to do it immediately before the game starts with the hosting bot.
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

Re: Best method to create ally ai in game?

Post by bobthedinosaur »

Yes that is basically what I was hoping for. I guess any way without having to ask players to set it up themselves is what I am looking for.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Best method to create ally ai in game?

Post by Silentwings »

It has to be in the start script. So normally this would be chosen by the player/autohost using a lobby before the game has started, or they would load a pre-made start script which had the bots in it. You could also do it with Spring.Reload and an ingame gui to set up what the player wants (and then reload to get it).
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

Re: Best method to create ally ai in game?

Post by bobthedinosaur »

thanks, I'll take a look into that
Post Reply

Return to “Game Development”