Page 1 of 1

Best method to create ally ai in game?

Posted: 01 May 2015, 01:14
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?

Re: Best method to create ally ai in game?

Posted: 01 May 2015, 01:54
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.

Re: Best method to create ally ai in game?

Posted: 01 May 2015, 03:53
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.

Re: Best method to create ally ai in game?

Posted: 01 May 2015, 09:07
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).

Re: Best method to create ally ai in game?

Posted: 01 May 2015, 21:49
by bobthedinosaur
thanks, I'll take a look into that