Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Twinfun

#1
AI Development / Re: Compile AI Info here
March 01, 2010, 05:07:30 PM
Quote from: goosie on March 01, 2010, 04:31:00 PMWhen AI goes through functions during a particular phase (there's Open, GroundA, GroundB, LateGround and similar ones for Air tactics), it executes stock commmands in the order they're written. It won't move on to the next Stock command without making sure the previous Stock values are all satisfied. So if you do something like

AISetStock( player, 8, C_ZU_Drone );
AISetStock( player, 1, C_ZB_Gateway );

it won't build gateway until you have 8 drones. If you lose a drone to a rush or w/e and the AI is still on that phase, it will go back and make sure you're back up to 8 drones before moving on to the rest of the script.

Makes sense accept for:

If I were to, say, tell the AI to build 10 zealots first without explicitly specifying it must build a Gateway, will it figure out on it's own the buildings it will need to complete the next task?

EDIT: How about it knowing to build Pylons?

ANOTHER EDIT: Thanks to the 1v1 Observer map posted up by Blackcode, I was easily able to test this. The AI will build the Gateway when it finds it requires one without being explicitly told.
#2
AI Development / Re: Compile AI Info here
March 01, 2010, 04:12:42 PM
I will make new topic if an admin states it is necessary, but does the second parameter in:

AISetStock( player, 8, C_ZU_Drone );

represent the amount to be stocked? IE, would that line in particular set the AI priority to having at least 8 drones? Or does it represent a different meaning.
Also I would like to know where the the function definition of AISetStock is because I'm having trouble locating it.

Thanks in advance!

EDIT: Anyone discover the difference between AISetStock and AIAddStringInt?