1.

Solve : Batch AI?

Answer»

Hello, I am make a game where you have your city that you build and create armys to attack the other ai's city but I have know idea how to get the ai to do stuff. And I don't know if this is posible but anything would help
Thanks a millon,
ShiverbobHere is how I did AI in my "game".  I had a 'turn' variable that changed each "day" in game.  Then I had a file like this:
Code: [Select]5. call :build House 5 6
15. call :build Armory 7 8
...Then something along these lines to run it:
Code: [Select]for /F "tokens=1-2 DELIMS=." %%A in (ai.txt) do if %turn% EQU %%A %%B

But mine was centered around NATURAL disasters, and not REALLY a competent opponent.Should it all be a BUNCH of %randoms% and ifs



Discussion

No Comment Found