How can I force AI units to attack certain location?
Posted: 09 Mar 2019, 10:49
Hi there! I'm trying to make a scenario with AI attacking some territories. It wasn't important to me to script some precise attack routes, so I'm simply using this:
Unfortunately, after some activity from AI (AI do capture 1-2 territories and attack 1-2 areas), it fixes all of the forces available in some location and then like "turns off". I'm not okay with it so I have to ask for help. Is there any way to force AI armies to consecutively attack some areas one by one? Also, can these attacks be fixed to the specific time, for example 2:00 minute of the game?
Code: Select all
GiveAttackBasePreference(2, "Attack1_Area", 10.0);
GiveAttackBasePreference(2, "Attack2_Area", 10.0);
GiveAttackBasePreference(2, "Attack3_Area", 10.0);
GiveAttackBasePreference(2, "East_Constantinople_Area", 9.0);
GiveAttackBasePreference(3, "Village_Area", 10.0);
GiveAttackBasePreference(3, "West_Constantinople_Area", 10.0);
GiveCaptureTerritoryPreference (2, "tx_terr_greek_2", 10.0);
GiveCaptureTerritoryPreference (2, "tx_terr_greek_10", 10.0);
GiveCaptureTerritoryPreference (2, "tx_terr_greek_15", 9.0);