Author Topic: AI Mine building  (Read 2067 times)

Offline HaXtOr

  • Sr. Member
  • ****
  • Posts: 423
    • http://www.wtfmoogle.com
AI Mine building
« on: October 23, 2004, 10:40:32 PM »
How to make a mine tutorial

step 1 create the units and vehicles and the mining beacon

Unit mine, sv;
TethysGame::CreateUnit(mine, map_Robo_Miner, LOCATION(x+9,y-3), player, map_None, 0);// make shure it is a little distance fromt the mine beacon so the survayer can survay
TethysGame::CreateBeacon(map_Mining_Beacon, x, y, !common, yield_3, 1 /*variant*/);
TethysGame::CreateUnit(sv, map_Robo_Surveyor, LOCATION(x+4,y-3), player, map_None, 0);
   
Step 2 survay the mine beacon

sv.DoMove(LOCATION(x,y));

Step 3 Building group creation and mine building

BuildingGroup &bldGrp = CreateBuildingGroup(Player[player]);
bldGrp.TakeUnit(mine);
bldGrp.RecordBuilding(LOCATION(x+6, y-3),map_Mine,map_None);

your done.
have fun
« Last Edit: October 23, 2004, 10:44:49 PM by HaXtOr »