Page 1 of 1

C++ API Question

Posted: 05 Jun 2010, 17:45
by SiriusDragon
Hi,

Is there a way of getting a list of the starting positions on a map?

I don't need to know if there's a player at the position or not (that'd be cheating :P), I just need some sort of scouting guide for my AI.

Any assistance would be greatly appreciated as I feel I'm struggling a bit with this AI API :oops:

I asked via the #AI chat channel in SpringLobby but didn't get a response... stupid timezones :(

Edit: Thanks to hoijui and abma for assisting me on #AI. They suggested using the metal spot density as a guide for finding start positions :)

Re: C++ API Question

Posted: 05 Jun 2010, 19:24
by AF
Alternatively, temporarily activate the cheat interface and grab the locations of all commander units in frame 1

Re: C++ API Question

Posted: 05 Jun 2010, 20:44
by slogic
AF wrote:Alternatively, temporarily activate the cheat interface and grab the locations of all commander units in frame 1
In BA with "Commander Gate Effect" option turned on this is not true.

Re: C++ API Question

Posted: 05 Jun 2010, 21:28
by AF
Then change the parameters from commanders at frame 1 to any enemy unit at frame 500

Re: C++ API Question

Posted: 08 Jun 2010, 02:20
by Chamrin
There should be some way of the api telling the ai the starting conditions, random starting spots from a list? Pre-placed, or chosen at game start by the player in start boxes (the ai should also have the ability to choose it's starting position as well).

Re: C++ API Question

Posted: 08 Jun 2010, 02:22
by AF
I would agree to that, so long as only allies are shown unless cheating is specified, at which point you might aswell just look for enemy units using the cheat interface.

Selecting your own starting point however is a good thing to have, but then how would you select the position?