How can I force AI units to attack certain location?

ImageImageTalking about Modding for EE2 and EE2 AOS. New maps, patches, programs and Multiplayer scenarios.
Post Reply
Bogdan
Posts: 67
Joined: 25 Feb 2017, 17:26

How can I force AI units to attack certain location?

Post by Bogdan » 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:

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?


User avatar
Dr.MonaLisa
High Representative
Posts: 7414
Joined: 17 Jun 2010, 11:21
Location: Poland

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

Post by Dr.MonaLisa » 09 Mar 2019, 11:28

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.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains

Bogdan
Posts: 67
Joined: 25 Feb 2017, 17:26

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

Post by Bogdan » 09 Mar 2019, 11:31

So there are no commands that allow to choose AI units and manage them?

User avatar
Dr.MonaLisa
High Representative
Posts: 7414
Joined: 17 Jun 2010, 11:21
Location: Poland

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

Post by Dr.MonaLisa » 09 Mar 2019, 11:34

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.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains

Post Reply

Return to “EE2 files, modding, maps, testing, etc.”