Page 1 of 1

!SET_AI_DEFEND_ALLIES

PostPosted: 09 Sep 2015, 14:57
by The Dark Lord
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?

Re: !SET_AI_DEFEND_ALLIES

PostPosted: 09 Sep 2015, 15:07
by Strangelove
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.

Re: !SET_AI_DEFEND_ALLIES

PostPosted: 09 Sep 2015, 15:11
by The Dark Lord
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.

Re: !SET_AI_DEFEND_ALLIES

PostPosted: 09 Sep 2015, 16:48
by Strangelove
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.

Re: !SET_AI_DEFEND_ALLIES

PostPosted: 09 Sep 2015, 16:56
by The Dark Lord
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.

Re: !SET_AI_DEFEND_ALLIES

PostPosted: 09 Sep 2015, 17:01
by Strangelove
Oh well, good to know that. :P