Map Database  •  FAQ  •  RSS  •  Login

!SET_AI_DEFEND_ALLIES

<<

The Dark Lord

User avatar

King Karolus Servant

Posts: 2154

Joined: 29 Aug 2007, 22:00

KaM Skill Level: Veteran

Location: In his dark thunderstormy castle

Post 09 Sep 2015, 14:57

!SET_AI_DEFEND_ALLIES

Or something like that. I put it in my script, but it doesn't seem to work. I want a AI player to defend the human player. What is required to make this work?
<<

Strangelove

User avatar

Crossbowman

Posts: 230

Joined: 30 Jul 2013, 06:32

KaM Skill Level: Fair

Post 09 Sep 2015, 15:07

Re: !SET_AI_DEFEND_ALLIES

Or something like that. I put it in my script, but it doesn't seem to work. I want a AI player to defend the human player. What is required to make this work?
I am not sure what you want the AI to do. I think the setting "Defend Allies" only works if they do have any troops on a defence position and the defence radius of said defence position covers your citizens or/and buildings. If its outside that defence range the AI simply does not "see" it. It works the same with AIs own buildings or/and citzien/troops. If they are outside any defence radius, they do not react at all. Furthermore, if you do set the AI to "Autodefend" they will only defend their own town and not yours.
<<

The Dark Lord

User avatar

King Karolus Servant

Posts: 2154

Joined: 29 Aug 2007, 22:00

KaM Skill Level: Veteran

Location: In his dark thunderstormy castle

Post 09 Sep 2015, 15:11

Re: !SET_AI_DEFEND_ALLIES

That's what I thought too, so I already changed the defence radius to 100; my troops are well within that range. But when they are under attack, the AI just keeps standing.
<<

Strangelove

User avatar

Crossbowman

Posts: 230

Joined: 30 Jul 2013, 06:32

KaM Skill Level: Fair

Post 09 Sep 2015, 16:48

Re: !SET_AI_DEFEND_ALLIES

Thats pretty weird. It remember this working in my campaign maps, however, both players were AIs. Stupid question for you... are you allied with that player? Cant think of anything else tbh.
<<

The Dark Lord

User avatar

King Karolus Servant

Posts: 2154

Joined: 29 Aug 2007, 22:00

KaM Skill Level: Veteran

Location: In his dark thunderstormy castle

Post 09 Sep 2015, 16:56

Re: !SET_AI_DEFEND_ALLIES

Yes, I was allied. ;) But I heard from Dicsoupcan it only works when both players are AI, which is a shame.
I fixed it with a dynamic script.
<<

Strangelove

User avatar

Crossbowman

Posts: 230

Joined: 30 Jul 2013, 06:32

KaM Skill Level: Fair

Post 09 Sep 2015, 17:01

Re: !SET_AI_DEFEND_ALLIES

Oh well, good to know that. :P

Return to “Dynamic Scripting”

Who is online

Users browsing this forum: No registered users and 10 guests