I have an army I can't make attack a city when I want it to.
On BeginTurnExecute I tell this army (with Event:MovePathOrder) to move to a city, this part works fine. Then in a pre MovePathOrder event handler I tell the army to move into (attack) the city, using Event:MoveToOrder, I've also tried Event:MoveArmy.
But when the events are given, my army is given the order to siege another city, and so it moves away from it's target toward the other city. And as you can imagine, on the next BeginTurnExecute the army follows my orders again and goes back to the target city.
I tried returning stop in a pre handler of MovePathOrder when my army is given a wrong location to move to, but this seems to do nothing. Obviously my army is being given *some* move event order before my own triggered "attack" events are being carried out.
So how do I get it to ALWAYS attack the city, if it's next to it?
On BeginTurnExecute I tell this army (with Event:MovePathOrder) to move to a city, this part works fine. Then in a pre MovePathOrder event handler I tell the army to move into (attack) the city, using Event:MoveToOrder, I've also tried Event:MoveArmy.
But when the events are given, my army is given the order to siege another city, and so it moves away from it's target toward the other city. And as you can imagine, on the next BeginTurnExecute the army follows my orders again and goes back to the target city.
I tried returning stop in a pre handler of MovePathOrder when my army is given a wrong location to move to, but this seems to do nothing. Obviously my army is being given *some* move event order before my own triggered "attack" events are being carried out.
So how do I get it to ALWAYS attack the city, if it's next to it?
Comment