try this one, it was used in the Titans expansion (I'm assuming you have that one)
C:\Program Files\Microsoft Games\Age of Mythology\AI2
if you don't i'll post it here
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ************************************************************ *****************
//
// AoMX07p4.xs - AI file for player 4 (Prometheans) in XPack scenario 7
//
// Scenario Designer: Joe Gillum
// AI Designer: Mike Kidd
//
/*
2003/06/23: This AI sends attack waves of prometheans at the human player.
The units are created by triggers, and the attack plans are formed under
trigger control through the aiFunc attack().
2003/07/18: Added code to fire vortex at a cluster of points, hopefully
avoiding the possibility of an enemy building preventing it from working.
*/
//
// ************************************************************ *****************
// ************************************************************ *****************
//
// Simple Main
//
// ************************************************************ *****************
void main()
{
aiEcho("Starting Scn07p4.xs");
aiRandSetSeed();
kbSetTownLocation(kbGetBlockPosition("4472"));
//Calculate some areas.
kbAreaCalculate(1200.0);
aiSetAttackResponseDistance(10.0);
}
void attack(int ignore=-1)
{
aiEcho("Launching attack");
static int count = 0;
int attackID = -1;
attackID = aiPlanCreate("Attack # "+count, cPlanAttack);
count = count + 1;
if (attackID < 0)
return; if (aiPlanSetVariableInt(attackID, cAttackPlanPlayerID, 0, 1) == false)
return;
if (aiPlanSetNumberVariableValues(attackID, cAttackPlanTargetTypeID, 3, true) == false)
return;
aiPlanSetVariableInt(attackID, cAttackPlanTargetTypeID, 0, cUnitTypeUnit);
aiPlanSetVariableInt(attackID, cAttackPlanTargetTypeID, 1, cUnitTypeBuilding);
aiPlanSetVariableInt(attackID, cAttackPlanTargetTypeID, 2, cUnitTypeAbstractWall);
// Specify other continent so that armies will transport
// aiPlanSetNumberVariableValues( attackID, cAttackPlanTargetAreaGroups, 1, true);
// aiEcho("Area group for mainland is "+kbAreaGroupGetIDByPosition(kbGetBlockPosition(cbMainland)));
// aiPlanSetVariableInt(attackID, cAttackPlanTargetAreaGroups, 0, kbAreaGroupGetIDByPosition(kbGetBlockPosition(cbMainland)));
aiPlanSetVariableVector(attackID, cAttackPlanGatherPoint, 0, kbGetBlockPosition("4472"));
aiPlanSetVariableFloat(attackID, cAttackPlanGatherDistance, 0, 50.0);
aiPlanAddUnitType(attackID, cUnitTypePromethean, 0, 200, 200);
aiPlanAddUnitType(attackID, cUnitTypePrometheanSmall, 0, 200, 200);
aiPlanAddUnitType(attackID, cUnitTypeAbstractTitan, 0, 1, 1);
aiPlanSetInitialPosition(attackID, kbGetBlockPosition("4472"));
aiPlanSetRequiresAllNeedUnits(attackID, false);
aiPlanSetDesiredPriority(attackID, 50); // Less than scouting, more than defense
aiPlanSetActive(attackID);
}
void callVortex(int ignore=0) // aiFunc to invoke vortex in an area. Five positions are tried to make sure a p1 building doesn't block it.
{
aiEcho("Attempting to invoke vortex in any of five locations.");
aiCastGodPowerAtPosition(cTechVortex, kbGetBlockPosition("1902"));
aiCastGodPowerAtPosition(cTechVortex, kbGetBlockPosition("1903"));
aiCastGodPowerAtPosition(cTechVortex, kbGetBlockPosition("1904"));
aiCastGodPowerAtPosition(cTechVortex, kbGetBlockPosition("1905"));
aiCastGodPowerAtPosition(cTechVortex, kbGetBlockPosition("1906"));
}
||||||||||||||||My Videos||||||||||||||||
Roxas, his heart was human, yet because of his status as a being his fate was sealed since he was born. How many times must humanity judge others like that as well without giving them a fair chance?
"It would be very irresponsible of me to give you my thoughts as you are clearly incapable of handling the ones you already have" ~some guy in OD