Page 1 of 1

How can I force AI units to attack certain location?

Posted: 09 Mar 2019, 10:49
by Bogdan
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:

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);
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?

Re: How can I force AI units to attack certain location?

Posted: 09 Mar 2019, 11:28
by Dr.MonaLisa
Unfortunately, I won't be able to help in this case. Never played with AI behavior by .ies scripts.
However, for timings it can be simply done with other rules that terminate previous.

Re: How can I force AI units to attack certain location?

Posted: 09 Mar 2019, 11:31
by Bogdan
So there are no commands that allow to choose AI units and manage them?

Re: How can I force AI units to attack certain location?

Posted: 09 Mar 2019, 11:34
by Dr.MonaLisa
Depends if they're present in the scripting document or not.

Let's see if someone else knows it. Maybe Loew or Grouch would know more.