You can do this by left-clicking (when selecting a single unit), by double-clicking (when selecting all units of the same type in the current field of view), or by dragging a selection box over the units (when selecting many units of different types).
 Right-click the part of your colony where you would like the units to keep vigil over. This should ideally be an area of the colony that is particularly prone to invasions or in the general direction of where your enemies come from when they attack.
 With the units still selected, click the Stand Ground icon. This is an icon of two soldiers holding crisscrossed spears that appears on the bottom left corner of the screen. Your military units will stay exactly where they are and attack any invaders immediately when they come into range.


The “Stand Ground” feature is only available in Age of Empires I and II.
 Build defensive buildings, like watchtowers and castles, in an area of the colony that is particularly prone to invasions and/or that is in the route commonly used by your enemies when they invade.


Garrison archers inside these buildings. To do this, select the archers and then right-click the tower or castle. The archers will now automatically fire at any approaching invaders from inside the buildings they are garrisoned in.
The garrisoning feature where units can attack from inside the building is only available in Age of Empires II.
Select the unit(s).
Move the units where you would like them to guard.
Issue the “Stand Ground” command.
Garrison archers inside defensive buildings.
{"src": "wikihow-all_test", "title": "How to Direct Your Units to Attack a Specific Enemy in Age of Empires3"}