Unit limit constant
Unit limit constant
I'd like to have a global unit limit constant. Something like maxUnits, that is always equal to 150, so that the scripts still worked if/when it changes on the code side. Cause i recently noticed that it's fairly important for an AI to be aware of this value (so that it didn't wait to fill up the attack groups when he can't produce units any longer, etc.) Probably the same with truck limit of 15.
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: Unit limit constant
From memory there's an additional constant of something like 999 (or was it 9999) units across all players? Then a per-player limit of trucks and other droids. So the AI needs to be aware of its player limits and the global limits for the game.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
Re: Unit limit constant
Added (3.1):
getDroidLimit([player[, unit type]])
Return maximum number of droids that this player can produce. This limit is usually fixed throughout a game and the same for all players. If no arguments are passed, returns general unit limit for the current player. If a second, unit type argument is passed, the limit for this unit type is returned, which may be different from the general unit limit (eg for commanders and construction droids).
getDroidLimit([player[, unit type]])
Return maximum number of droids that this player can produce. This limit is usually fixed throughout a game and the same for all players. If no arguments are passed, returns general unit limit for the current player. If a second, unit type argument is passed, the limit for this unit type is returned, which may be different from the general unit limit (eg for commanders and construction droids).
Re: Unit limit constant
Yes other wise a player can beat Al easy.
"My IRC en multiplay naam is Andrie"
Groete Andrie
Groete Andrie



