I added a new unit xml tag which makes a unit unable to be attacked, enables it to enter the same plot as an enemy unit, and even enter enemy cities without capturing them. I then added a unit mission which made the unit able to boost diplomacy with the owner of the capital it was in. The diplomacy boost, however, does not take effect until the next turn.
If you are at war with the owner of the capital in which the unit is boosting diplomacy, you can still enter the capital and perform the mission, but every time an enemy unit enters its visibility range, it wakes the unit. This is annoying not only because you have to repeatedly click the mission on subsequent turns, but also because, since the diplomacy boost does not take effect until the next turn, you do not get the boost if the unit is being woken every turn.
So my question is, is anyone aware of the function which wakes a unit from its mission when an enemy unit enters its visibility range? I have been thoroughly searching the SDK, but I can't seem to find the function anywhere. Any help would be greatly appreciated.
Thanks in advance!
If you are at war with the owner of the capital in which the unit is boosting diplomacy, you can still enter the capital and perform the mission, but every time an enemy unit enters its visibility range, it wakes the unit. This is annoying not only because you have to repeatedly click the mission on subsequent turns, but also because, since the diplomacy boost does not take effect until the next turn, you do not get the boost if the unit is being woken every turn.
So my question is, is anyone aware of the function which wakes a unit from its mission when an enemy unit enters its visibility range? I have been thoroughly searching the SDK, but I can't seem to find the function anywhere. Any help would be greatly appreciated.
Thanks in advance!