| 04-04-2009, 03:59 PM | #1 |
Hello again; I would like to adjust the way a computer-controlled player (Neutral Extra slot) manages its siege units. In normal circumstances its default behavior works perfectly, but if and only if this unit is near a certain type of building (Scout Tower, etc.) I would like the siege unit to ignore any other potential targets around itself and attack the tower building instead. I want this behavior to apply only to this type of siege unit and not to any other unit in the computer's army, and so I do not want to change the tower's priority; the most likely option to me seems to be using triggers to order the siege unit to attack the tower units. I am not sure how to go about making such a trigger, however. I've tried going about this from a variety of angles; the most recent approach involved in the event that a generic unit is attacked and on the condition that the attacking unit is of the unit-type my siege unit, if/then/else action if the attacked unit is within 600 units of a unit of type my tower unit then order the attacking unit to attack the unit matching these conditions. This was unsuccessful and appeared to have no effect on the AI's behavior. Can someone point me in the right direction, or is it because I am using a neutral player slot that it cannot be ordered to behave properly? Thanks. |
