If the guard is standing still all the game through you could first try to set the, uhm dont remember whats its called range XD (that range which decide when units attack) to 0. Then make a region in front og him, and make a trigger which will make him attack a unit if it enters that region. This might give trouble if theres more units entering tho, but its all i can come up with... :S