home *** CD-ROM | disk | FTP | other *** search
- //==============================================================================
- // Minicampaign Scenario 1: AI Script for Minicampaign scenario 1, player 6
- //==============================================================================
- /*
- AI owner: Karen Sparks
- Scenario owner: Karen Sparks
-
- Overview:
- The player is gathering cows for player 6 (Arngrim). Player 6 herds the cows to a
- safe, uncongested location.
- */
-
- //==============================================================================
- // miscStartup
- //==============================================================================
- void miscStartup(void)
- {
- // Difficulty Level check.
- int difflevel=-1;
- difflevel=aiGetWorldDifficulty();
-
- //Startup message(s).
- aiEcho("");
- aiEcho("");
- aiEcho("Frosty AI Start, filename='"+cFilename+"'.");
- aiEcho("Difficulty Level="+difflevel+".");
- //Spit out the map size.
- aiEcho(" Map size is ("+kbGetMapXSize()+", "+kbGetMapZSize()+").");
- //Cheat like a bastard. Once only, though.
- kbLookAtAllUnitsOnMap();
- //Calculate some areas.
- kbAreaCalculate(1200.0);
- //Reset random seed
- aiRandSetSeed();
- //Allocate all resources to the root escrow.
- kbEscrowAllocateCurrentResources();
- }
-
-
- //==============================================================================
- // main
- //==============================================================================
- void main(void)
- {
- //Startup.
- miscStartup();
-
- //Create a herd plan to gather all herdables that we ecounter.
- int herdPlanID=aiPlanCreate("HerdTest", cPlanHerd);
- if (herdPlanID >= 0)
- {
- aiPlanAddUnitType(herdPlanID, cUnitTypeHerdable, 0, 100, 100);
- aiPlanSetVariableInt(herdPlanID, cHerdPlanBuildingTypeID, 0, cUnitTypeTent);
- aiPlanSetActive(herdPlanID);
- }
-
- }
-