It appears you have not registered with our community. To register please click here ...
Username
Password
Hi everyone,I've worked with different forms of AI and bot scripting, but I'm unfamiliar with the SC2 AI script as I'm still new to it, I've read through most of the topic and I have some questions that I hope you guys would help me in answering them.1.) Where in the first place does the execution of the script takes place? Which function is called first when the AI is first loaded?2.) Does the script runs in a linear fashion which checks from top to bottom? If it does, is it limited to the boundary of one main function or one or more .galaxy files?Thanks.
void Example(int player){ AIClearStock(player); // * this line is run first AISetStock(player, 1, c_ZU_Hatchery_Alias); // * this line is run second TestSomething(player, someVar); // * all code in this function is run before any code after this line // * you can control when something is handled through logic checking if (intReturn > 0) { // * do not run this code unless the IF evaluates to true, if it does not, this code will be skipped until it does return true AnotherTest(player, anotherVar); } AISetStock(player, 10, c_ZU_Zergling); // * this won't run until after AnotherTest if the IF evaluates to true}
include "path/file"
include "TriggerLibs/mycustomstuff"
Thanks for the reply people, I'm developing my first AI now.O ya, about scouting, how do i make a unit wanders around an opponent's base instead of running around the whole map?